构建.NET 4项目南特 [英] Building .NET 4 projects with Nant

查看:157
本文介绍了构建.NET 4项目南特的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何获得恶性建立面向.NET 4.0框架的项目?

How do I get nant to build projects that target the .NET 4.0 Framework?

推荐答案

2010年4月15日,... 更新上面从尤金正确的答案,.NET 4和Visual Studio 2010发布之后。

2010 April 15, ... Update to above correct answer from Eugene, after .net 4 and vs2010 was released.

我下载VS2010和.NET 4运行。 量产版似乎是v4.30319即(C:\ WINDOWS \ Microsoft.NET \框架\ v4.0.30319)

I downloaded vs2010 and .net 4 runtime. The production version seems to be v4.30319 ie (C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319)

在审查<一href="http://paigecsharp.blogspot.com/2009/08/nant-net-framework-40-configuration.html">http://paigecsharp.blogspot.com/2009/08/nant-net-framework-40-configuration.html, ... 我粘贴文本,改变所有文本从v4.0.20506到v4.30319的 添加文字NAnt.exe.config。

After reviewing http://paigecsharp.blogspot.com/2009/08/nant-net-framework-40-configuration.html, ... I pasted in the text and changed all text from v4.0.20506 to v4.30319 an added text to NAnt.exe.config.

然后,我更新了我的恶性脚本

I then updated my nant script to

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

这让我的项目恶性脚本使用.NET 4编译

this so my project nant script uses the .net 4 compiler

这让我一个恶性构建在.NET 4中二进制....

And this got me a nant build with .net 4 binary ....

更新2010-06-14:以上是与楠-0.85回答,我升级到南特-0.90,不得不增加供应商=微软到被添加到nants配置框架属性。此外,它看起来像nant0.9发现.NET库的方式不同,因为我不得不这样的事情添加到我的恶性的build.xml ...

Update 2010-06-14: The above was answered with nant-0.85, I upgraded to nant-0.90 and had to add vendor="Microsoft" to framework attribute that is added to nants config. Also, it looks like nant0.9 finds the .net libraries differently, as I had to add something like this to my nant build.xml ...

<property name="framework-get-assembly-directory" value="${framework::get-assembly-directory('net-4.0')}" />
<property name="dotNetReferenceAssemblyPath" value="${framework-get-assembly-directory}\" />

<include name="${dotNetReferenceAssemblyPath}System.ComponentModel.DataAnnotations.dll" />

这篇关于构建.NET 4项目南特的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆