Ok my build file now looks like the following
<?xml version="1.0" encoding="utf-8" ?>
<project name="CalcApp">
<property name="nant.settings.currentframework" value="net-3.5" />
<target name="build">
<msbuild project="c:\projects_2008\Calcapp\CalcApp.sln">
<property name="Configuration" value="debug"/>
</msbuild>
</target>
</project>
When I do the build and I set the solution to 3.5 framework in the
properties/Application/Target Framework 3.5 then the solution builds without
a problem;
However when I change the target to Framework 2.0 and generate a log file I
get the following
Buildfile: file:///C:/Projects_2008/CalcApp/CalcApp/calcapp.build
Target framework: Microsoft .NET
Framework 3.5
Base Directory: C:\Projects_2008\CalcApp\CalcApp.
Target(s) specified: build
[property] Target framework changed to "Microsoft .NET Framework 2.0".
Build sequence for target `build' is build
Complete build sequence is build
build:
[msbuild] Starting MSBuild...
[msbuild] Starting
'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\msbuild.exe (@"C:\Documents
and Settings\wheelerz\Local Settings\Temp\tmp248.tmp")' in
'C:\Projects_2008\CalcApp\CalcApp'
[msbuild] c:\projects_2008\Calcapp\CalcApp.sln(2): Solution file error
MSB5014: File format version is not recognized. MSBuild can only read
solution files between versions 7.0 and 9.0, inclusive.
BUILD FAILED
C:\Projects_2008\CalcApp\CalcApp\calcapp.build(13,6):
Failed to start MSBuild.:
NAnt.Core.BuildException:
C:\Projects_2008\CalcApp\CalcApp\calcapp.build(13,6):
Failed to start MSBuild. --->
C:\Projects_2008\CalcApp\CalcApp\calcapp.build(13,6):
External Program Failed:
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\msbuild.exe (return code was
1):
NAnt.Core.BuildException:
C:\Projects_2008\CalcApp\CalcApp\calcapp.build(13,6):
External Program Failed:
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\msbuild.exe (return code was
1)
at NAnt.Core.Tasks.ExternalProgramBase.ExecuteTask()
at NAnt.Contrib.Tasks.MsbuildTask.ExecuteTask()
--- End of inner exception stack trace ---
at NAnt.Contrib.Tasks.MsbuildTask.ExecuteTask()
at NAnt.Core.Task.Execute()
at NAnt.Core.Target.Execute()
at NAnt.Core.Project.Execute(String targetName, Boolean
forceDependencies)
at NAnt.Core.Project.Execute()
at NAnt.Core.Project.Run()
Total time: 1.1 seconds.
Am I missing an extension or file that states what the solution is?
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
From: Phil Sayers [mailto:p...@cds-am.net]
Sent: Friday, February 27, 2009 4:48 PM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] addendum to vs2008, 2.0 framework, ---- my build
file
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