- Using this command we can execute some other commands (such as aspnet_merge or xcopy) or custom actions. We can pass a .proj file (a MSBuild script file) as an input argument to this command.
- You can find it here: C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe
- You can easily add this tool to Visual Studio; go to Tools/External Tools/Add tool
MSBuild scriptMSBuild script file is an xml file with the extension of .proj in which we can define what actions we want the MSBuild.exe to execute.
Example of MSBuild script:
Using the following MSBuild script you can compile a website solution, merge the assemblies created and copy the contents of the compiled solution to a destination folder (Please remove the br elements):
Why using MSBuild?
Using MSBuild we can have automated build and testing. We can use CruiseControl.NET to listen to the events (such as a checkin or commit) happening in source controls (such as Visual SourceSafe or SubVersion), then to run a pre-defined MSBuild command. In which way, we can have automated build and testing.
- http://www.asp.net/learn/3.5-videos/video-394.aspx (video)
- http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx (MSBuild reference)
- http://cruisecontrol.sourceforge.net/ (CruiseControl.NET)