Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/visual-studio-2010/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2010 NAnt MSBuild版本_Visual Studio 2010_Build_Msbuild_Nant - Fatal编程技术网

Visual studio 2010 NAnt MSBuild版本

Visual studio 2010 NAnt MSBuild版本,visual-studio-2010,build,msbuild,nant,Visual Studio 2010,Build,Msbuild,Nant,其中是nant中设置要使用的MSBuild版本的配置设置 Nant希望在需要使用4.0时使用3.5。几年前我写了一篇博客文章,解释了如何从Nant构建脚本中利用任何版本的MSBuild。基本上,您将使用节点调用安装在计算机上的MSBuild 您还可以创建NAnt框架配置。如果编辑NAnt.exe.config文件,请复制其中一个元素及其所有子元素。更改frameworkdirectory以使用要使用的MSBuild的版本号。您可以查看其他元素以了解正确用法。例如,如果您想让“net-3.5”元

其中是nant中设置要使用的MSBuild版本的配置设置


Nant希望在需要使用4.0时使用3.5。

几年前我写了一篇博客文章,解释了如何从Nant构建脚本中利用任何版本的MSBuild。基本上,您将使用
节点调用安装在计算机上的MSBuild


您还可以创建NAnt框架配置。如果编辑NAnt.exe.config文件,请复制其中一个
元素及其所有子元素。更改
frameworkdirectory
以使用要使用的MSBuild的版本号。您可以查看其他
元素以了解正确用法。例如,如果您想让“net-3.5”元素
使用MSBuild 4.0,只需将重复的
打开元素更改为:

<framework 
    name="net-3.5-msbuild-4.0"
    family="net"
    version="3.5"
    description="Microsoft .NET Framework 3.5 with MSBuild 4.0"
    sdkdirectory="${sdkInstallRoot}"
    frameworkdirectory="${path::combine(installRoot, 'v4.0.30319')}"
    frameworkassemblydirectory="${path::combine(installRoot, 'v2.0.50727')}"
    clrversion="2.0.50727"
    clrtype="Desktop"
    vendor="Microsoft"
    ><!-- Rest of framework contents here --></framework>

为什么不在本地使用MSBuild?
<framework 
    name="net-3.5-msbuild-4.0"
    family="net"
    version="3.5"
    description="Microsoft .NET Framework 3.5 with MSBuild 4.0"
    sdkdirectory="${sdkInstallRoot}"
    frameworkdirectory="${path::combine(installRoot, 'v4.0.30319')}"
    frameworkassemblydirectory="${path::combine(installRoot, 'v2.0.50727')}"
    clrversion="2.0.50727"
    clrtype="Desktop"
    vendor="Microsoft"
    ><!-- Rest of framework contents here --></framework>
<property name="nant.settings.currentframework" value="net-3.5-msbuild-4.0" />