0

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?

ForeverLearning
  • 6,352
  • 3
  • 27
  • 33
  • Please show what you have tried. It is not very clear exactly what you are asking. – NightOwl888 Jun 19 '17 at 15:59
  • @NightOwl888 What exactly is not clear? That will help me reframe the question. BTW, I haven't tried anything because I haven't seen a way to do this. Basically be able to 1) Open a .sln file 2) Exclude some projects from the build for some configurations 3) Rename and save sln file. I want to be able to do this programmatically. – ForeverLearning Jun 19 '17 at 16:05

0 Answers0