blog community

Welcome to blog community Sign in | Join | Help
in Search

Raimond Brookman

Architecture and .NET Development

How does MSBuild build a solution?

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 :-)

Published Monday, May 22, 2006 12:45 PM by Raimondb
Filed under: , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

TrackBack said:

Raimond Brookman asks the question: How does MSBuild build a solution?

Clark Sell asks the question:...
May 25, 2006 3:29 PM
 

J Leonard said:

At the command line, I typed

set MSBuildEmitSolution=1 <enter>

Then I typed

MSBuild <enter>

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.

January 17, 2007 10:45 PM
 

Raimondb said:

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...

January 18, 2007 1:13 PM
 

Team Foundation Sidekicks said:

What do you do in Visual Studio when you need to develop several related modules at the same time? Probably

February 13, 2008 9:05 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

Subscribe in NewsGator Online

Subscribe in Bloglines

Add to Google


 Visitors since June 2005




Powered by Community Server, by Telligent Systems