I get a list of projects using following:
var solution = (IVsSolution)Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(IVsSolution));
Refer following link for more details.
But it gives me each and every item in the solution like Directories, projects, etc. I require only projects.
How can I get only projects from the solution?