I have a Visual Studio solution (ab.sln) which references two (VC) project files a.proj and b.proj. The projects depend on each other (A is a postProject ProjectDependency of B). This dependency is needed when compiling under Visual Studio.
Now I want to compile only project B from the command line and I thought msbuild would be a good choice. But I want to compile the two projects separately in different folders (for CI). After compiling A, I want to copy the required files over to the working directory for the B compile.
How can I compile one project in the solution from the command line without building the dependencies (and without having an extra file)? My current command that builds the dependency is:
msbuild /t:b ab.sln
I could of course use a separate solution file b.sln that just contains project B, but I was trying to do without the extra file.
The answer given by jlew in How to get MSBuild to ignore project references? does not work for me, probably because I do not use ProjectReferences.