Accessing files and folders inside projects added to a SolutionFolder (vs2005)  
Author Message
Henrik Karlsson





PostPosted: Visual C++ General, Accessing files and folders inside projects added to a SolutionFolder (vs2005) Top

I'm having a hard time accessing the files and folders under projects that are added to SolutionFolders. I can traverse all the projects and find all projects that are of the type SolutionFolder in there, I can also traverse all regular projects and their files / folders. But when it comes to the projects that are added under the SolutionFolder I can't find anything even though a lot of stuff is laying under them.

This is how my solution looks like:

Solution
Project // Find ProjectItems under here
Project
SolutionFolder // Find ProjectItems under here that has the same name as the Projects under the SolutionFolder
Project // I can access these projects as ProjectItems but can't find any items under them
Project
Project

I can't find any documentation at all about this on MSDN or searching through Google. I can find information about how to add projects to SolutionFolders but nowhere how to access them and read their content.

I'm using C++ but I gladly welcome any solutions using other languages (VB, C#, etc)... I need this in order to add support for SolutionFolders to my Devstudio add-in

Best regards,

Henrik Karlsson




Visual C++15  
 
 
Simple Samples





PostPosted: Visual C++ General, Accessing files and folders inside projects added to a SolutionFolder (vs2005) Top

I don't understand. The most unclear thing is "access". I have no idea what you mean by that.

I get the impression you think you know how things are supposed to work and you are trying to explain how things are supposed to work and you are assuming a lot that you don't say, so it is difficult for us to understand what you don't understand.



 
 
Henrik Karlsson





PostPosted: Visual C++ General, Accessing files and folders inside projects added to a SolutionFolder (vs2005) Top

Ok, I'll give it another try :-)

We have solutions that include SolutionFolders in them. I would like to be able to iterate through all the files that the projects inside the solutionfolder holds just as I can iterate through the files that the regular projects holds.

Now, I can't find any information about this and I'm wondering if someone knows anything about this.

Maybe it is impossible to read this information out of the vs com-interface and I'll just have to parse the .sln-files but it would have been nice to know :-)

Thanks,

Henrik



 
 
Henrik Karlsson





PostPosted: Visual C++ General, Accessing files and folders inside projects added to a SolutionFolder (vs2005) Top

Ok... I found it. I was searching in the wrong place. There was a property "SubProject" under the ProjectItem type that returned the right project under the SolutionFolder.

Now everything works and I'm very happy :-)

/h