Building Visual Studio projects/solutions without having Visual Studio installed – MSBuild howto

Did you know that you can build almost every Visual Studio 2003/2005 Solution/Project without even having Visual Studio installed? You only need to have the Microsoft.NET Framework v2 (or better) installed. The Framework brings a great tool named “MSBuild” which helps you to build, for example, YAPS on your own machine.

  1. Download the YAPS sourcecode (or any other project…) and extract to a folder
  2. open a commandline window (Start->Run->”cmd.exe”) and change to that folder
  3. run MSBuild in that folder. Normally MSBuild is in \WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe
  4. When no errors are reported, you’re done. If there were errors, check the source and/or the folder. You need to run MSBuild where the sln/csproj files are…

This is what compiling the YAPS daily sourcecode looks like on my machine:

Source 1: MSBuild at MSDN
Source 2: MSBuild Team Blog