Compiler errors nant生成文件是使用nant 0.86而不是0.91 alpha 2构建的

Compiler errors nant生成文件是使用nant 0.86而不是0.91 alpha 2构建的,compiler-errors,nant,Compiler Errors,Nant,从我的控制台摘录 Microsoft Windows[版本6.1.7601] 版权c 2009微软公司。版权所有 C:\Users\miralp>cd\ C:>cd SVN C:\SVN>。\Tools\nant-0.91-alpha2\bin\nant.exe-构建文件:C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build 系统找不到指定的路径 C:\SVN>Tools\nant-0.91-alpha2\bin\nant.exe-构建文件

从我的控制台摘录

Microsoft Windows[版本6.1.7601] 版权c 2009微软公司。版权所有

C:\Users\miralp>cd\

C:>cd SVN

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

C:\SVN>Tools\nant-0.91-alpha2\bin\nant.exe-构建文件:C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build NAnt 0.91构建0.91.3881.0;α2;17/08/2010 版权C 2001-2010 Gerry Shaw

构建文件:file:///C:/SVN/BestFareFinderGit/Source/Deploy/Functions.build 目标框架:Microsoft.NET framework 4.0

构建失败

C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build4,3: 编译失败: c:\Users\miralp\AppData\Local\Temp\izhn5siv.0.cs36,6:错误CS0012:未引用的程序集中定义了类型“System.Xml.XmlDocument”。必须添加对程序集“系统”的引用。 Xml,版本=1.0.3300.0,区域性=中性,PublicKeyToken=b77a5c561934e089'。 //--------------------------------------- // //这段代码是由一个工具生成的。 //运行时版本:4.0.30319.239 // //对此文件的更改可能会导致不正确的行为,如果 //重新生成代码。 // //---------------------------------------

使用NAnt.Core; 使用NAnt.Core.Attributes; 使用制度; 使用系统集合; 使用System.IO; 使用系统文本

[功能设置ttl,ttl] 公共类nant84cd7051c5eb497da059d002e13b0448:NAnt.Core.FunctionSetBase{

[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秒

C:\SVN>Tools\nant\bin\nant.exe-buildfile:C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build NAnt 0.86构建0.86.2898.0;β1;08/12/2007 版权C 2001-2007 Gerry Shaw

构建文件:file:///C:/SVN/BestFareFinderGit/Source/Deploy/Functions.build 目标框架:Microsoft.NET framework 3.5

[脚本]扫描程序集jp pfatj以获取扩展。 [脚本]扫描程序集rzb29ihl以查找扩展

建造成功

总时间:4.8秒


C:\SVN>。\Tools\nant-0.91-alpha2\bin\nant.exe-构建文件:C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build

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

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

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