Tuesday, December 11, 2007

.NET 3.5, NAnt and CruiseControl.NET

My build server at work is a VM that does not have VS 2005/8 installed on it. I like to keep it that way because it keeps the large install footprint from being replicated to the build machine. All of the installs that we do at my company can be build from NAnt command line or we can build inside of VS.

.NET 3.5 and VS 2008 specifically, changed how the tools required to build using NAnt are deployed. Here are the steps I went through in order to get our solutions that were .NET 2.0/VS2005 buildable using NAnt 0.85 w/ NAntContrib running under .NET 3.5:


  1. Download the .NET 3.5 Runtime available here
  2. Download the NAnt 0.86 Beta 1 here
  3. Download the NAntContrib 0.85 Nightly here
  4. If you now attempt to run a nant build file you might find you get an error like



  5. There are several key components that are no longed installed into the RuntimeDirectory (aka C:\Windows\Microsoft.NET\Framework\v3.5. Things like the gacutil, sn.exe, xsd.exe, svcutil.exe etc… are missing.) These can now be found at C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin, but only if you install some extra things from the VS 2008 install CD.

  6. On my CD obtained during the padnug VS2008 Install Party (or alternatively in the ISO you can download from MS). Open the \WCU\WinSDK folder and grab the WinSDK_*.exe files. Copy these up to your build server, and then extract the bits using WinZip (or your favorite ZIP archive program). I noted that you could not run the EXEs directly, note there might be a better way to do this via the VS 2008 Installer CD, but I was following some instructions and a hunch based on Blog de Jérémie Clabaut. (Incidently, I google’d ‘visual studio 2008 SDK gacutil’ to find this)

  7. Once you’ve run the .msi’s that you extracted, you should find gacutil and friends in their new location at C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin. I believe that you only need to install the WinSDK_W32Tools.exe and WinSDK_NetFxTools.exe, but I installed all five of them.

Currently, my projects are still using .NET 2.0 and not .NET 3.5. Most likely there will be some gotchas as most of our stack uses components like NHibernate 1.2, log4.net, etc… that I’ve not yet tested to make sure they work with .NET 3.5. VS 2008 seems to run a lot faster! I’ve not installed any of my old favorite AddIns yet though like, Copy As HTML or Resharper.


One other notable thing: the Cassini Web Server that runs your HTTP applications without deploying to IIS has also changed locations and is located at: C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0\WebDev.WebServer.EXE.