In visual studio extension I would like to get all projects and their names:
var service = (DTE) Package.GetGlobalService(typeof (SDTE));
var projects = service.Solution.Projects;
foreach (Project project in projects)
//....
This approach work nice and neat for exception of one little problem: project variable returns really exact number of project. But project's full name might be EMPTY if it located in the solution's folder. (I mean the structure of solution when projects are united in the solution's folder)
How to get these project properly?
Here is a solution. This guy is the Lord of Rings as minimum: http://www.wwwlicious.com/2011/03/29/envdte-getting-all-projects-html/
Relevant information from the blog, in case it goes away (like so many other answers on Stack Overflow):