Tuesday, July 1, 2008

Upgrading to NANT 0.86 for .NET 3.5

Recently, having to upgrade the project I am working on from .NET 3.0 to 3.5, I did not realize that the NANT 0.85 is unable to support the building of .NET 3.5 project till I tried to build the project. In order to continue to automate the build process of the project, NANT 0.86 beta 1 have to be used. During the upgrade I have hit some problem and will like to share the problem I have and how to workaround them.

If you are using previous version of NANT 0.85 to build on .NET 3.0 and 2.0 project, you need to download the NANT 0.86 and unzip to your machine. Next, you will be required to change the environment variable of the NANT path to the bin folder location of the latest version of NANT. Restart your computer and add the following "<property name="nant.settings.currentframework" value="net-3.5" ⁄>" just after the project of the build files. This is enough for you to get your .NET 3.5 project built.

For project involving the reference of System.ServiceModel.dll, you might get some error message will trying to build the project. You will be required to change the referenced dll from the above mentioned to System.ServiceModel.Web.dll which usually can be found in the “Drive:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\”.

Also, the nunit2report is also not working with the current version of NANT. For those preferring to run nunit test report with the nunit2report, you can just copy the following list of files found in the NANT 0.85 bin folder to the 0.86 bin folder and it should work fine:
  1. NAnt.NUnit2ReportTasks.dll
  2. i18n.xsl
  3. NUnit-Frame.xsl
  4. NUnit-NoFrame.xsl
  5. toolkit.xsl
With all this minor changes… everything should be up and running.

No comments: