Maybe I am overlooking something here but I can't seem to find a good way to parse a solution file and programmatically exclude some projects (.vcxproj) from the build. Many SO posts reference the SolutionFile
class in Microsoft.Build.Construction
to enumerate the list of projects and their configurations. In fact there is even a IncludeInBuild
property that tells me if a particular configuration is selected to be included in the build (see: https://msdn.microsoft.com/en-us/library/microsoft.build.construction.projectconfigurationinsolution.includeinbuild.aspx)
However I can't seem to find a way to alter/create-a-copy-of the solution file and do a moral equivalent of setting the IncludeInBuild property to false for some projects.
Is this not possible today?