Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Finding the startup project in a complicated solution

$
0
0
I need to navigate through a solution and find a startup project, but I'm having a lot of difficulty if there are embedded folders. Consider this example (I am hoping my indentation stays intact):

Solution1
Folder1
Project1
Folder2
Folder3
Project2
Project3

Let's say that the startup project is Project2, I have a pointer to the solution called pSolution, and my code is in C++. I can call pSolution->get_Projects to return a collection of 3 "projects" (Folder1, Folder2, and Project3). Now let's say that I enumerate through the projects and assign the Folder2 "project" to the pointer pProj. I can now call pProj->get_ProjectItems to return a collection of ProjectItems that simply has Folder3. I assign that ProjectItem to pointer pProjItem. I now I now need to call pProjItem->get_ProjectItems to get access to Project2, but that call fails every time! Why is it that EnvDTE:: ProjectItem::get_ProjectItems always fails. And is there any other easier way I can do this?

I apologize if my example is confusing.

Viewing all articles
Browse latest Browse all 4410

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>