Is there a way to exclude a project from the solution when building with msbuild? Usually, I call this:

start /WAIT /B msbuild servers.sln /p:configure=debug /m 

I know that there is a parameter /t , with which you can list the projects that should participate in the assembly. But how to remove the project - alas. Who will tell?

  • Is the option of listing / separate assembling only the necessary projects for some reason not suitable? - Vladimir Gamalyan
  • @VladimirGamalian, in general - certainly fits. I just often have to collect projects of this kind, I would like to do this without unnecessary problems - namely, excluding one project from the solution. - isnullxbh
  • If the operation is quite frequent - it may make sense to write an intermediate script or custom task for msbuild, which will understand such a key, generate a list of projects excluding the one you need, and then build it as usual. - Vladimir Gamalyan
  • @VladimirGamalian, well, if I understood you correctly, then this is what I said above - use the / t switch? - isnullxbh
  • one
    Yeah, the script gets the list of projects from the sln file, removes unnecessary ones from it, and then, after / t, runs msbuild for example. - Vladimir Gamalyan

0