The nant.settings.currentframework helps nant work out which version of
MSBuild to use.

You need to tell nant to use the 3.5 edition of MSBuild so it will
successfully recognize your .sln file.

 

When the .Net 3.5 version of MSBuild reads the .sln file it will see the
.Net 2.0 settings in the .sln file and correctly target the 2.0 framework.

 

In my nant build files I have success with this.

This is to build Visual studio 2008 Solution files targeted to .Net
framework 2.0.

 

<property name="nant.settings.currentframework" value="net-3.5" />

<msbuild project="SolutionPath" />

 

 

From: Zachary B. Wheeler [mailto:zwhee...@sddmtech.com] 
Sent: Friday, February 27, 2009 4:16 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] addendum to vs2008, 2.0 framework, ---- my build file

 

Here is the build file that I am using

 

<?xml version="1.0" encoding="utf-8" ?>

<project name="CalcApp">

  <property name="nant.settings.currentframework" value="net-2.0" />

  <target name="build">

 

    <solution configuration="debug"
solutionfile="c:\projects_2008\Calcapp\CalcApp.sln"/>

    <!-- this works for 3.5 framework not for 2.0 framework

         if after i change the frame value in both spots here and the
project

         

    <msbuild project="c:\projects_2008\Calcapp\CalcApp.sln">

      <property name="Configuration" value="debug"/>

    </msbuild>

    -->

  </target>

  

 

</project>

 

 

Zachary B. Wheeler

Principal

www.sddmtech.com

"We Listen To Our Customers"

Contact: 202.528.8969

Toll Free: 866.830.4147

Fax: 202.478.2886

 

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to