如何更改Nant编译的目标框架版本?

We just started on a .NET 2.0 project that I am currently creating all the NAnt build scripts for. Since we have a mixture of .NET 1.1 and .NET 2.0 projects I need to be able to change the compilers I am using on the fly. First I had to get a version of NAnt that supported the .NET 2.0 framework, so I grabbed a nightly from April 30, 2006. There are two options you can use to change the target framework. The first is a command line argument when executing the build file ([-t] framework):

 

nant -buildfile:test.Build -t:net-2.0

The other option is to set a property within your build file itself

<!-- Change Target Framework to .NET 2.0 -->
<property name="nant.settings.currentframework" value="net-2.0" />

 

原文:http://www.punkcoder.com/2006/05/change-target-framework-in-nant.html

posted on 2010-07-09 10:08  zqonline  阅读(442)  评论(0编辑  收藏  举报

导航