|
 Monday, March 05, 2007
« Running Notepad++ From the command line | Main | Visual Studio SP1 with Vista »

Tree Surgeon - .NET 2.0 Reference Incorrect

Problem

The .NET Framework reference in the most recent release of Tree Surgeon has an old reference to .NET 2.0 Beta 1. This is in the NAnt.exe.config file.

This will produce results that will not compile when using the <msbuild> task of the NAntContrib Tasks.

Fix

Open the file located in "ProjectName/Tools/nant/NAnt.exe.config" file.

Find this:

<framework 
   name="net-2.0" 
   family="net" 
   version="2.0" 
   description="Microsoft .NET Framework 2.0 Beta 1" 
   runtimeengine=""
   sdkdirectory="${path::combine(sdkInstallRoot, 'bin')}" 
   frameworkdirectory="${path::combine(installRoot, 'v2.0.40607')}" 
   frameworkassemblydirectory="${path::combine(installRoot, 'v2.0.40607')}"
   clrversion="2.0.40607"
>

Then replace it with this:

<framework 
   name="net-2.0" 
   family="net" 
   version="2.0" 
   description="Microsoft .NET Framework 2.0" 
   runtimeengine=""
   sdkdirectory="${path::combine(sdkInstallRoot, 'bin')}" 
   frameworkdirectory="${path::combine(installRoot, 'v2.0.50727')}" 
   frameworkassemblydirectory="${path::combine(installRoot, 'v2.0.50727')}"
   clrversion="2.0.50727"
>

This will fix the issue and allow you to remove the <solution> task from the default build file that is included in each project generation.

You will now be able to utilize the <msbuild> task in the NAntContrib. See below:

<target name="compile" description="Compiles using the AutomatedDebug Configuration">
        <loadtasks assembly="tools/nantcontrib-0.85/bin/NAnt.Contrib.Tasks.dll" />
        <msbuild project="src\MyProject.sln">
            <property name="Configuration" value="AutomatedDebug" />
        </msbuild>
</target>

#    Comments [0] |
Name
E-mail
(will show your gravatar icon)
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview