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.
- go to
Tools/External tools ...
- 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.
- Now when you click
OK, the new configuration will appear in the Tools menu.
You will still need to build your project from Visual Studio, but you can automate any additional tasks.