【问题标题】:nant build file builts with nant 0.86 and not with 0.91 alpha 2nant 构建文件使用 nant 0.86 而不是 0.91 alpha 2 构建
【发布时间】:2011-12-30 15:10:56
【问题描述】:

来自我的控制台的摘录

Microsoft Windows [版本 6.1.7601] 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\miralp>cd\

C:>cd SVN

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;2010 年 8 月 17 日) 版权所有 (C) 2001-2010 Gerry Shaw http://nant.sourceforge.net

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

构建失败

C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build(4,3): 编译失败: c:\Users\miralp\AppData\Local\Temp\izhn5siv.0.cs(36,6):错误 CS0012:类型“System.Xml.XmlDocument”在未引用的程序集中定义。您必须添加对程序集“System. Xml,版本=1.0.3300.0,文化=中性,PublicKeyToken=b77a5c561934e089'。 //------------------------------------------------ ------------------------------ // // 此代码由工具生成。 // 运行时版本:4.0.30319.239 // // 对该文件的更改可能会导致不正确的行为,并且会丢失 // 重新生成代码。 // //------------------------------------------------ ------------------------------

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

[函数集(“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>工具\nant\bin\nant.exe -buildfile:C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build NAnt 0.86(内部版本 0.86.2898.0;beta1;08/12/2007) 版权所有 (C) 2001-2007 Gerry Shaw http://nant.sourceforge.net

构建文件: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 -buildfile:C:\SVN\BestFareFinderGit\Source\Deploy\Functions.build

【问题讨论】:

    标签: compiler-errors nant


    【解决方案1】:

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

    尝试像这样设置nant.settings.currentframework 属性:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-31
      • 1970-01-01
      • 2011-10-15
      • 1970-01-01
      相关资源
      最近更新 更多