MSBuild only builds Xml files that follow the MSBuild standards.
However, there is a special case for solutions, because you can just build solutions using MSBuild, although this is not an MSBuild format.
MSBuild supports this by first generating an in-memory MSBuild file (called a traversal project) that will build all projects included in the solution.
Sometimes, it is useful to know how this internal traversal project looks. There is a way to make MSBuild save this file. This is done by setting an enviroment variable:
set MSBuildEmitSolution=1
When you run MSBuild this will create an additional project file in the current directory with this traversal project, so you can see how things are done. For instance, when you are using web projects, you will see the magic that calls the ASP.NET compiler 🙂
2 comments
At the command line, I typed
set MSBuildEmitSolution=1
Then I typed
MSBuild
There was no new file.
Since the author did not mention what the name of this new file would be, I’m unable to even search my hard drive to find it.
This article was not useful as it seem to do nothing.
J Leonard
I assume that you ran MSBuild on an actual solution file and not ran it in some random directory where no solution file was available?
In the second case; nothing will happen, as the flag just outputs the msbuild translation of the .sln file…
Raimondb