Home > Web > MSBuild – an Ant alternative for dotNet

MSBuild – an Ant alternative for dotNet


If you are used to automatic build solution like Ant and familiar with .Net, you should know that there is a .Net version too: NAnt.
But there is also a dedicated M$ solution too: MSBuild. Good thing is that comes with Visual Studio, no more download, install, update etc.
Still it requires just a few steps to integrate into you Visual Studio project.
As Ant build files, MSBuild files are simply XML files. So the first step will be to right-click on solution and add a new xml file. Name this file and give it the ”.proj” extension.
Second step will be to actually integrate it and execute it.

  1. go to Tools/External tools ...
  2. Add MSBuild file as a new external tool. Specify a title, the location of the MSBuild executable (default location is C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe), the location of the MSBuild script XML file and a starting folder. You can use $(SolutionDir) to refer to the solution folder.
  3. Now when you click OK, the new configuration will appear in the Tools menu.

MSBuild configuration in Visual Studio

You will still need to build your project from Visual Studio, but you can automate any additional tasks.

Categories: Web
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: