我目前在我的机器上安装了VS2013和VS2015。
默认情况下,FAKE F#Make似乎正在使用VS2015构建。
我尝试将VisualStudioVersion 12.0传递给我的MSBuild任务,但似乎没有任何效果。
我看到有些文章说要更改Fake.exe.config中的MSBuildPath,但我没有看到该exe文件中的MSBuildPath。
如何确保它使用随Visual Studio 2012(12.0)提供的MSBuild?
答案 0 :(得分:5)
此代码适用于我:
let toolsVersion = "12.0"
let setParams defaults =
{ defaults with
ToolsVersion = Some(toolsVersion)
}
build setParams solutionPath
|> DoNothing
答案 1 :(得分:0)
@Andrew代码没有为我改变MSBuild版本。我想出了另一种方法来实现这一点。
EnvironmentHelper.setBuildParam "VisualStudioVersion" "14.0"
对于vs2013,你也可以使用“12.0”;对于vs2017,你也可以使用“15.0”。 这是link to Fake source在构建期间使用此变量。