I’m trying to write a compile preprocessor of sorts for a Visual Studio.net solution. I need to get a list of every file in the solution, both source and header files.
Can anyone point me towards how to do this?
thanks
I’m trying to write a compile preprocessor of sorts for a Visual Studio.net solution. I need to get a list of every file in the solution, both source and header files.
Can anyone point me towards how to do this?
thanks
Looks like you’ll have to drill down into Common Environment Object Model, then go from Solution -> Projects -> ProjectItems
Sample navigation code here .
It might be easier to replace cl.exe with a copy of your own that does the preprocessing for every file it’s called on and then invokes the default cl.exe with all the switches that were passed in.
Actually I just parsed through the .xml in the .vcproj file in a quick and dirty fashion. Wheeeeee.