Does DTE provide a way to just read a Visual Studio solution file as opposed to calling DTE.Solution.Open(...) which actually loads it? I have some Add-in code that can walk through all the items in a solution file (including containing projects) but I want to avoid actually loading the .sln as its mammoth! VS 2010 routinely has trouble doing anything useful once the solution is loaded. The intellisense hangs forever trying to parse all the header files and such.
Asked
Active
Viewed 109 times
1
-
... why not just read the file? – May 15 '15 at 20:05
-
@Will but how do I then work with VS' object model? I want to be able to enumerate over project items, projects and such. Or are you saying there is a "read" equivalent of Solution.Open? – ForeverLearning May 15 '15 at 20:08
-
Yes, it is possible to just read the *.sln file and enumerate the projects in it. It is possible to do it from inline tasks https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-inline-tasks?view=vs-2019 and from the VSIX, too. – Pavel Stepanek Dec 19 '22 at 15:33