首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >nant构建文件使用nant 0.86而不是0.91 alpha 2构建

nant构建文件使用nant 0.86而不是0.91 alpha 2构建
EN

Stack Overflow用户
提问于 2011-11-17 00:59:08
回答 1查看 639关注 0票数 0

来自我的控制台的摘录

Microsoft Windows版本6.1.7601版权所有(c) 2009 Microsoft Corporation。版权所有。

C:\Users\miralp>cd\

C:>cd服务器名

C:\SVN>..\Tools\nant-0.91-alpha2\bin\nant.exe -buildfile:C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build系统找不到指定的路径。

C:\SVN>工具\ NAnt - 0.91 -Alpha2\bin\nant.exe -buildfile:C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build NAnt 0.91(内部版本0.91.3881.0;alpha2;17/08/2010)版权所有(C) 2001-2010 Gerry Shaw http://nant.sourceforge.net

构建文件: file:///C:/SVN/BestFareFinderGit/Source/Deploy/Functions.build目标框架:微软.NET Framework4.0

构建失败

C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build(4,3):编译失败: c:\Users\miralp\AppData\Local\Temp\izhn5siv.0.cs(36,6):error CS0012:在未引用的程序集中定义了类型'System.Xml.XmlDocument‘。必须添加对程序集‘System.xml,Version=1.0.3300.0,Culture=neutral,PublicKeyToken=b77a5c561934e089’的引用。//------------------------------------------------------------------------------ /此代码由工具生成。//运行时版本:4.0.30319.239/对此文件的更改可能会导致不正确的行为,如果重新生成代码,//这些更改将会丢失。// //----------------------------

使用NAnt.Core;使用NAnt.Core.Attributes;使用系统;使用System.Collections;使用System.IO;使用System.Text;

FunctionSet("ttl","ttl")公共类nant84cd7051c5eb497da059d002e13b0448 : NAnt.Core.FunctionSetBase {

代码语言:javascript
复制
[Function("expand_nant_properties_into_template")]
public string Expand_nant_properties_into_template(string templateFilepath, string propertiesFilepath, string applicationVersion)
{
 const int INDENT_LEVEL = 0;
 const string APPLICATION_VERSION = "applicationVersion";

 //Get the contents of the template to be expanded
 string template = new FileInfo(templateFilepath)
        .OpenText()
        .ReadToEnd();

 //Create a new NAnt project with only the properties in the properties file
 Project project = new Project(propertiesFilepath, Level.None, INDENT_LEVEL);
 project.Properties.Add(APPLICATION_VERSION, applicationVersion);

 //Load the properties into memory
 project.Run();

 return project.Properties.ExpandProperties(template, Location.UnknownLocation);
}


public nant84cd7051c5eb497da059d002e13b0448(NAnt.Core.Project project, NAnt.Core.PropertyDictionary propDict) :
        base(project, propDict) {
}

}

总时间: 1.4秒。

-buildfile:C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build C:\SVN>Tools\nant\bin\nant.exe NAnt 0.86 (Build 0.86.2898.0;beta1;08/12/2007)版权所有(C) 2001-2007 C:\SVN>Tools\nant\bin\nant.exe Shaw http://nant.sourceforge.net

构建文件: file:///C:/SVN/BestFareFinderGit/Source/Deploy/Functions.build目标框架:微软.NET Framework3.5

脚本扫描程序集"jp-pfatj“以查找扩展。脚本扫描程序集"rzb29ihl“中的扩展。

构建成功

总时间: 4.8秒。

C:\SVN>..\Tools\nant-0.91-alpha2\bin\nant.exe -buildfile:C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build

EN

回答 1

Stack Overflow用户

发布于 2011-12-08 19:22:24

我假设您正在使用msbuild nant任务。

尝试按如下方式设置nant.settings.currentframework属性:

代码语言:javascript
复制
<property name="nant.settings.currentframework" value="net-3.5" />
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8155578

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档