我如何告诉NuGet使用什么可执行的MSBuild? [英] How Can I Tell NuGet What MSBuild Executable to Use?

查看:138
本文介绍了我如何告诉NuGet使用什么可执行的MSBuild?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

NuGet显然具有确定使用什么MSBuild可执行文件的逻辑.有没有方法可以覆盖此行为?或者至少是一种告诉它使用x86 MSBuild而不是x64的方法?

NuGet apparently has some logic to determine what MSBuild Executable to use. Is there a way to override this behavior? Or at least a way to tell it to use the x86 MSBuild instead of x64?

MSBuild自动检测:使用来自'C:\ Program Files(x86)\ MSBuild \ 14.0 \ bin \ amd64'的msbuild版本'14 .0'.

MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin\amd64'.

推荐答案

来自命令行文档,则可以在命令行上指定-MSBuildPath-MSBuildVersion.

From the command-line documentation, you can specify -MSBuildPath or -MSBuildVersion on the command line.

MSBuildPath(4.0+)指定与 命令,优先于-MSBuildVersion.

MSBuildPath (4.0+) Specifies the path of MSBuild to use with the command, taking precedence over -MSBuildVersion.

MSBuildVersion(3.2+) 指定与此命令一起使用的MSBuild版本. 支持的值为4、12、14、15.默认情况下, 选择路径,否则默认为安装的最高版本 MSBuild.

MSBuildVersion (3.2+) Specifies the version of MSBuild to be used with this command. Supported values are 4, 12, 14, 15. By default the MSBuild in your path is picked, otherwise it defaults to the highest installed version of MSBuild.

这篇关于我如何告诉NuGet使用什么可执行的MSBuild?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆