Is there a good tutorial on MSBuild scripts? [closed]

Solution 1:

This was my first tutorial. Very easy to understand and follow:

https://codingcockerel.wordpress.com/2008/04/15/automating-the-build-with-msbuild/

Solution 2:

Start here : http://brennan.offwhite.net/blog/2006/11/29/msbuild-basics-1of7/

Solution 3:

There is a "Getting Started with MSBuild" blog post on the the Visual Studio Blog which gives a good overview on how MSBuild is hooked up with Visual studio. It's fairly recent (25.02.2010) and uses Visual Studio 2010 and the accompanying MSBuild v4.0.

There is not much code there though.

It wasn't until reading this blog that I understood that the *.csproj files themselves are MSBuild files. And also, that the Build, Clean, Rebuild and Publish command in the project context menu actually are MSBuild "targets".

Solution 4:

I wasted a lot of time before buying the Hashimi MSBuild book, fantastic -- I concur with this review by Steven St Jean.

In addition to an excellent all-round introduction to MSBuild scripting, it has a cookbook section on doing typical build automation thigns like build numbers etc. Obviously the last TeamBuild section will not be directly relevant for you, but a lot of the topics are generic across all CI tools.

UPDATE: The 2nd ed keeps up the trend, adding a must-have section re WebDeploy

Solution 5:

I wrote this a couple of years ago and try to keep it up to date with new MSBuild features:

http://thomasardal.com/msbuild-tutorial/