- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我很好奇是否可以使用 Nant 使用 C# 5.0 编译器来定位 .NET 4.5。截至目前,最新版本仅声明支持 .NET 4.0。
在安装 .net 4.5 框架后,我尝试下载源代码并使用 msbuild 构建 .sln,但这会产生大量错误。
最佳答案
最好打NAnt mailing list与你的发现。它不是那么活跃,但 NAnt 肯定会得到更新以支持新框架。问题是,微软通常会使用新版本更改文件位置,并且指向这些文件的注册表项也会更改,因此在微软发布实际版本之前,实际上不可能支持它。用于测试。
我目前正在运行它,目标是 4.5。在 NAnt.exe.config
,更改<startup>
节点:
<startup>
<!-- .NET Framework 4.5 -->
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
<!-- .NET Framework 4.0 -->
<supportedRuntime version="v4.0.30319" />
<!-- .NET Framework 2.0 -->
<supportedRuntime version="v2.0.50727" />
</startup>
<framework>
节点(
net-4.0 的副本,引用程序集除外):
<framework
name="net-4.5"
family="net"
version="4.5"
description="Microsoft .NET Framework 4.5"
sdkdirectory="${sdkInstallRoot}"
frameworkdirectory="${path::combine(installRoot, 'v4.0.30319')}"
frameworkassemblydirectory="${path::combine(installRoot, 'v4.0.30319')}"
clrversion="4.0.30319"
clrtype="Desktop"
vendor="Microsoft"
>
<runtime>
<probing-paths>
<directory name="lib/common/2.0" />
<directory name="lib/common/neutral" />
</probing-paths>
<modes>
<strict>
<environment>
<variable name="COMPLUS_VERSION" value="v4.0.30319" />
</environment>
</strict>
</modes>
</runtime>
<reference-assemblies basedir="${path::combine(installRoot, 'v4.0.30319')}">
<include name="Accessibility.dll" />
<include name="Microsoft.Build.Conversion.v4.0.dll" />
<include name="Microsoft.Build.dll" />
<include name="Microsoft.Build.Engine.dll" />
<include name="Microsoft.Build.Framework.dll" />
<include name="Microsoft.Build.Tasks.v4.0.dll" />
<include name="Microsoft.Build.Utilities.v4.0.dll" />
<include name="Microsoft.CSharp.dll" />
<include name="Microsoft.Data.Entity.Build.Tasks.dll" />
<include name="Microsoft.JScript.dll" />
<include name="Microsoft.Transactions.Bridge.dll" />
<include name="Microsoft.Transactions.Bridge.Dtc.dll" />
<include name="Microsoft.VisualBasic.Activities.Compiler.dll" />
<include name="Microsoft.VisualBasic.Compatibility.Data.dll" />
<include name="Microsoft.VisualBasic.Compatibility.dll" />
<include name="Microsoft.VisualBasic.dll" />
<include name="Microsoft.VisualC.dll" />
<include name="Microsoft.VisualC.STLCLR.dll" />
<include name="mscorlib.dll" />
<include name="System.Activities.Core.Presentation.dll" />
<include name="System.Activities.dll" />
<include name="System.Activities.DurableInstancing.dll" />
<include name="System.Activities.Presentation.dll" />
<include name="System.AddIn.Contract" />
<include name="System.AddIn.dll" />
<include name="System.ComponentModel.Composition.dll" />
<include name="System.ComponentModel.DataAnnotations.dll" />
<include name="System.Configuration.dll" />
<include name="System.Configuration.Install.dll" />
<include name="System.Core.dll" />
<include name="System.Data.DataSetExtensions.dll" />
<include name="System.Data.dll" />
<include name="System.Data.Entity.Design.dll" />
<include name="System.Data.Entity.dll" />
<include name="System.Data.Linq.dll" />
<include name="System.Data.OracleClient.dll" />
<include name="System.Data.Services.Client.dll" />
<include name="System.Data.Services.Design.dll" />
<include name="System.Data.Services.dll" />
<include name="System.Data.SqlXml.dll" />
<include name="System.Deployment.dll" />
<include name="System.Design.dll" />
<include name="System.Device.dll" />
<include name="System.DirectoryServices.dll" />
<include name="System.DirectoryServices.Protocols.dll" />
<include name="System.dll" />
<include name="System.Drawing.Design.dll" />
<include name="System.Drawing.dll" />
<include name="System.Dynamic.dll" />
<include name="System.EnterpriseServices.dll" />
<include name="System.EnterpriseServices.Thunk.dll" />
<include name="System.EnterpriseServices.Wrapper.dll" />
<include name="System.IdentityModel.dll" />
<include name="System.IdentityModel.Selectors.dll" />
<include name="System.IO.Log.dll" />
<include name="System.Management.dll" />
<include name="System.Management.Instrumentation.dll" />
<include name="System.Messaging.dll" />
<include name="System.Net.dll" />
<include name="System.Numerics.dll" />
<include name="System.Runtime.Caching.dll" />
<include name="System.Runtime.DurableInstancing.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="System.Runtime.Serialization.dll" />
<include name="System.Runtime.Serialization.Formatters.Soap.dll" />
<include name="System.Security.dll" />
<include name="System.ServiceModel.Activation.dll" />
<include name="System.ServiceModel.Activities.dll" />
<include name="System.ServiceModel.Channels.dll" />
<include name="System.ServiceModel.Discovery.dll" />
<include name="System.ServiceModel.dll" />
<include name="System.ServiceModel.Routing.dll" />
<include name="System.ServiceModel.ServiceMoniker40.dll" />
<include name="System.ServiceModel.WasHosting.dll" />
<include name="System.ServiceModel.Web.dll" />
<include name="System.ServiceProcess.dll" />
<include name="System.Transactions.dll" />
<include name="System.Web.Abstractions.dll" />
<include name="System.Web.ApplicationServices.dll" />
<include name="System.Web.DataVisualization.Design.dll" />
<include name="System.Web.DataVisualization.dll" />
<include name="System.Web.dll" />
<include name="System.Web.DynamicData.Design.dll" />
<include name="System.Web.DynamicData.dll" />
<include name="System.Web.Entity.Design.dll" />
<include name="System.Web.Entity.dll" />
<include name="System.Web.Extensions.Design.dll" />
<include name="System.Web.Extensions.dll" />
<include name="System.Web.Mobile.dll" />
<include name="System.Web.RegularExpressions.dll" />
<include name="System.Web.Routing.dll" />
<include name="System.Web.Services.dll" />
<include name="System.Windows.Forms.DataVisualization.Design.dll" />
<include name="System.Windows.Forms.DataVisualization.dll" />
<include name="System.Windows.Forms.dll" />
<include name="System.Workflow.Activities.dll" />
<include name="System.Workflow.ComponentModel.dll" />
<include name="System.Workflow.Runtime.dll" />
<include name="System.WorkflowServices.dll" />
<include name="System.Xaml.dll" />
<include name="System.Xaml.Hosting.dll" />
<include name="System.Xml.dll" />
<include name="System.Xml.Linq.dll" />
</reference-assemblies>
<!-- WPF Assemblies -->
<reference-assemblies basedir="${path::combine(installRoot, 'v4.0.30319')}/WPF">
<include name="NaturalLanguage6.dll" />
<include name="NlsData0009.dll" />
<include name="NlsLexicons0009.dll" />
<include name="PenIMC.dll" />
<include name="PresentationCore.dll" />
<include name="PresentationFramework.Aero.dll" />
<include name="PresentationFramework.Classic.dll" />
<include name="PresentationFramework.dll" />
<include name="PresentationFramework.Luna.dll" />
<include name="PresentationFramework.Royale.dll" />
<include name="PresentationHost_v0400.dll" />
<include name="PresentationNative_v0400.dll" />
<include name="PresentationUI.dll" />
<include name="ReachFramework.dll" />
<include name="System.Printing.dll" />
<include name="System.Speech.dll" />
<include name="System.Windows.Input.Manipulations.dll" />
<include name="System.Windows.Presentation.dll" />
<include name="UIAutomationClient.dll" />
<include name="UIAutomationClientsideProviders.dll" />
<include name="UIAutomationProvider.dll" />
<include name="UIAutomationTypes.dll" />
<include name="WindowsBase.dll" />
<include name="WindowsFormsIntegration.dll" />
<include name="wpfgfx_v0400.dll" />
<include name="wpftxt_v0400.dll" />
</reference-assemblies>
<reference-assemblies basedir="${environment::get-folder-path('ProgramFiles')}/Reference Assemblies/Microsoft/Framework/.NETFramework/v4.5">
<include name="Microsoft.Build.Conversion.v4.0.dll" />
<include name="Microsoft.Build.dll" />
<include name="Microsoft.Build.Engine.dll" />
<include name="Microsoft.Build.Framework.dll" />
<include name="Microsoft.Build.Tasks.v4.0.dll" />
<include name="Microsoft.Build.Utilities.v4.0.dll" />
<include name="Microsoft.CSharp.dll" />
<include name="Microsoft.JScript.dll" />
<include name="Microsoft.VisualBasic.Compatibility.Data.dll" />
<include name="Microsoft.VisualBasic.Comptatibility.dll" />
<include name="Microsoft.VisualBasic.dll" />
<include name="Microsoft.VisualC.dll" />
<include name="Microsoft.VisualC.STLCLR.dll" />
<include name="mscorlib.dll" />
<include name="PresentationBuildTasks.dll" />
<include name="PresentationCore.dll" />
<include name="WindowsBase.dll" />
<include name="PresentationFramework.dll" />
<include name="PresentationFramework.Aero.dll" />
<include name="PresentationFramework.Classic.dll" />
<include name="PresentationFramework.Luna.dll" />
<include name="PresentationFramework.Royale.dll" />
<include name="ReachFramework.dll" />
<include name="System.Activities.Core.Presentation.dll" />
<include name="System.Activities.dll" />
<include name="System.Activities.DurableInstancing.dll" />
<include name="System.Activities.Presentation.dll" />
<include name="System.AddIn.Contract.dll" />
<include name="System.AddIn.dll" />
<include name="System.ComponentModel.Composition.dll" />
<include name="System.ComponentModel.DataAnnotations.dll" />
<include name="System.Configuration.dll" />
<include name="System.Core.dll" />
<include name="System.Data.DataSetExtension.dll" />
<include name="System.Data.dll" />
<include name="System.Data.Entity.Design.dll" />
<include name="System.Data.Entity.dll" />
<include name="System.Data.Linq.dll" />
<include name="System.Data.OracleClient.dll" />
<include name="System.Data.Services.Client.dll" />
<include name="System.Data.Services.Design.dll" />
<include name="System.Data.Services.dll" />
<include name="System.Data.SqlXml.dll" />
<include name="System.Deployment.dll" />
<include name="System.Design.dll" />
<include name="System.Device.dll" />
<include name="System.DirectoryServices.AccountManagement.dll" />
<include name="System.DirectoryServices.dll" />
<include name="System.DirectoryServices.Protocols.dll" />
<include name="System.dll" />
<include name="System.Drawing.Design.dll" />
<include name="System.Drawing.dll" />
<include name="System.EnterpriseServices.dll" />
<include name="System.EnterpriseServices.Thunk.dll" />
<include name="System.EnterpriseServices.Wrapper.dll" />
<include name="System.IdentityModel.dll" />
<include name="System.IdentityModel.Selectors.dll" />
<include name="System.IO.Log.dll" />
<include name="System.Management.dll" />
<include name="System.Management.Instrumentation.dll" />
<include name="System.Messaging.dll" />
<include name="System.Net.dll" />
<include name="System.Numerics.dll" />
<include name="System.Printing.dll" />
<include name="System.Runtime.Caching.dll" />
<include name="System.Runtime.DurableInstancing.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="System.Runtime.Serialization.dll" />
<include name="System.Runtime.Serialization.Formatters.Soap.dll" />
<include name="System.Security.dll" />
<include name="System.ServiceModel.Activation.dll" />
<include name="System.ServiceModel.Activities.dll" />
<include name="System.ServiceModel.Channels.dll" />
<include name="System.ServiceModel.Discovery.dll" />
<include name="System.ServiceModel.dll" />
<include name="System.ServiceModel.Routing.dll" />
<include name="System.ServiceModel.Web.dll" />
<include name="System.ServiceProcess.dll" />
<include name="System.Speech.dll" />
<include name="System.Transactions.dll" />
<include name="System.Web.Abstractions.dll" />
<include name="System.Web.ApplicationServices.dll" />
<include name="System.Web.DataVisualization.Design.dll" />
<include name="System.Web.DataVisualization.dll" />
<include name="System.Web.dll" />
<include name="System.Web.DynamicData.Design.dll" />
<include name="System.Web.DynamicData.dll" />
<include name="System.Web.Entity.Design.dll" />
<include name="System.Web.Entity.dll" />
<include name="System.Web.Extensions.Design.dll" />
<include name="System.Web.Extensions.dll" />
<include name="System.Web.Mobile.dll" />
<include name="System.Web.RegularExpressions.dll" />
<include name="System.Web.Routing.dll" />
<include name="System.Web.Services.dll" />
<include name="System.Windows.Forms.DataVisualization.Design.dll" />
<include name="System.Windows.Forms.DataVisualization.dll" />
<include name="System.Windows.Forms.dll" />
<include name="System.Windows.Input.Manipulations.dll" />
<include name="System.Windows.Presentation.dll" />
<include name="System.Workflow.Activities.dll" />
<include name="System.Workflow.ComponentModel.dll" />
<include name="System.Workflow.Runtime.dll" />
<include name="System.WorkflowServices.dll" />
<include name="System.Xaml.dll" />
<include name="System.Xml.dll" />
<include name="System.Xml.Linq.dll" />
</reference-assemblies>
<task-assemblies>
<!-- include MS.NET version-neutral assemblies -->
<include name="extensions/net/neutral/**/*.dll" />
<!-- include MS.NET 4.0 specific assemblies -->
<include name="extensions/net/4.0/**/*.dll" />
<!-- include MS.NET specific task assembly -->
<include name="NAnt.MSNetTasks.dll" />
<!-- include MS.NET specific test assembly -->
<include name="NAnt.MSNet.Tests.dll" />
<!-- include .NET 4.0 specific assemblies -->
<include name="extensions/common/4.0/**/*.dll" />
</task-assemblies>
<tool-paths>
<directory name="${sdkInstallRoot}"
if="${property::exists('sdkInstallRoot')}" />
<directory name="${path::combine(installRoot, 'v4.0.30319')}" />
</tool-paths>
<project>
<readregistry
property="installRoot"
key="SOFTWARE\Microsoft\.NETFramework\InstallRoot"
hive="LocalMachine" />
<locatesdk property="sdkInstallRoot" minwinsdkver="v7.0A" minnetfxver="4.0" maxnetfxver="4.0.99999" failonerror="false" />
</project>
<tasks>
<task name="csc">
<attribute name="supportsnowarnlist">true</attribute>
<attribute name="supportswarnaserrorlist">true</attribute>
<attribute name="supportskeycontainer">true</attribute>
<attribute name="supportskeyfile">true</attribute>
<attribute name="supportsdelaysign">true</attribute>
<attribute name="supportsplatform">true</attribute>
<attribute name="supportslangversion">true</attribute>
</task>
<task name="vbc">
<attribute name="supportsdocgeneration">true</attribute>
<attribute name="supportsnostdlib">true</attribute>
<attribute name="supportsnowarnlist">true</attribute>
<attribute name="supportskeycontainer">true</attribute>
<attribute name="supportskeyfile">true</attribute>
<attribute name="supportsdelaysign">true</attribute>
<attribute name="supportsplatform">true</attribute>
<attribute name="supportswarnaserrorlist">true</attribute>
</task>
<task name="jsc">
<attribute name="supportsplatform">true</attribute>
</task>
<task name="vjc">
<attribute name="supportsnowarnlist">true</attribute>
<attribute name="supportskeycontainer">true</attribute>
<attribute name="supportskeyfile">true</attribute>
<attribute name="supportsdelaysign">true</attribute>
</task>
<task name="resgen">
<attribute name="supportsassemblyreferences">true</attribute>
<attribute name="supportsexternalfilereferences">true</attribute>
</task>
<task name="delay-sign">
<attribute name="exename">sn</attribute>
</task>
<task name="license">
<attribute name="exename">lc</attribute>
<attribute name="supportsassemblyreferences">true</attribute>
</task>
</tasks>
</framework>
关于nant - 使用 Nant 构建 .NET 4.5 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11837795/
我正在使用 nant 来构建我们的产品,并编写了一个自定义任务来通知我们的服务台系统有新的构建版本可用。 我使用 nant 构建自定义任务,并将自定义 nant 任务程序集复制到 nant 文件夹中,
NAnt 是否仍在积极开发中,或者是否有其他项目在自动构建领域获得更多动力? 编辑: 显然,MSBuild 会继续进步,但考虑到可以使用 NAnt 完成的所有额外任务,为什么开发突然停止,因为许多开源
我正在使用 NAnt 以不同的配置为同一软件构建 5 个不同的安装程序包。这些任务可以并行化,因为它们不相互依赖。正在构建这些配置的 Installshield 在多核 CPU 使用率方面似乎效率低下
我知道 NAnt 经常被使用(嗯,我总是将它用于我的 CI 构建)但是自 2007 年 12 月以来没有新的正式版本。该项目是在接受积极的开发还是已经死池了?让我担心的是,如果我继续使用它,并且它停止
我正在尝试编写一个自定义 NAnt 任务来执行一些基于文件的操作。其中一项非常有用的功能是运行 的能力。过滤其中一个输入文件。 为了保持任务的通用性,我只想启用对 的支持元素(类似于 任务的工作
我有一个 nant 脚本,我看到即使我的 exec 失败,NANT 的退出代码仍然是 0。如何更改 NANT 退出代码? 最佳答案 exec task有一个名为“resultproperty”的属性,
我在这里有一个大项目,我在其中创建了一些构建文件,这些文件用于不同的场景,包括 ccnet。所以,我有 BF1.build 和 BF2.build 我只想在 BF1 的某个地方调用/执行来自 BF2.
我在构建文件中有一个 fileset 元素定义为: 当它运行时(作为复制任务的一部分),如果任何文件丢失它都不会提示。虽然我可以在 fileset 元素中使用 failonem
我想使用 ant 脚本创建一个文件。像 mkdir 一样,在 nant 脚本中可以使用任何命令来创建文本或 doc 文件吗? 最佳答案 您可以使用 创建文件(或更新其时间戳)的任务。使用 您可以将
首先,我已经看过这个帖子了:nant mail issues但唯一的答案并不令人满意(即:对我不起作用)。 我正在使用 NAnt 获取最新版本的源代码、升级库和应用程序版本、构建应用程序、build设
NAnt 构建文件中用于项目、目标、任务、函数等的关键字是否区分大小写? 最佳答案 试试这个 NAnt 构建脚本: 这是输出: test:
我正在寻找一种在单独的线程上执行的能力,并具有在执行完成后加入那些单独的线程的能力...在任何版本的NAnt中是否存在这样的事情? 最佳答案 从注释中:Parallel task execution
我有一个通用的 common.xml 文件,其中包含许多在多个构建中重复使用的通用 nant 目标。我想要做的是“覆盖”其中一些 nant 目标,并在执行现有目标之前或之后包括其他步骤。 是否首先使用
我不是 Nant 的专家,所以我不得不问这个 redicolus 问题。 我有一个名为 svn.source.root 的变量指向 c:\folderA\FolderB\FolderC 我怎样才能让
我正在尝试使用 Nant 替换 wxs 文件中出现的字符串。 我只找到了下面的例子,它使用了 ,但它似乎只能在复制的文件中使用。有没有其他方法可以替换字符串而不实际复制文件?
有谁知道如何使用带有换行符的 echo 输出消息,在 Ant 世界中我使用了 ${line.seperator},但我在 Nant 中没有看到任何相关属性,也没有任何函数提供此信息。我也尝试了\n 转
我正在寻找我的构建来删除目录的内容而不触及某个文件夹。下面是我正在尝试的,它甚至对我来说看起来是错误的......除了当我运行它时它会爆炸这一事实。我是否需要明确删除该目录的内容,同时排除我的 Rep
我怎样才能单独从属性文件中读取一个值。例如,如何从以下示例中读取 build.home 或 temp.dir 的值。 env.properties 的内容 build.home=c:\build te
目前我正在调用 findstr 并将输出存储在一个属性中以供事后检查 - 我确信一定有更好的解决方案。 这真的是最好的方法吗? 最佳答案 关于nant - 如何检查文件是否包含
我正在尝试并行运行多个任务以减少构建时间。但似乎任务正在一个接一个地依次执行。这对我的构建花费了太多时间。有没有办法在 NAnt 中并行运行多个任务? 最佳答案 之前好像问过这个问题。见 NAnt:
我是一名优秀的程序员,十分优秀!