更新时间:2022-04-11 10:38:44
原来你可以直接在 .csproj 文件中指定 SDK 的路径:
It turns out you can specify the path to the SDK directly in the .csproj file:
并且构建以这种方式找到了 lc.exe.
and the build found lc.exe that way.
我之前希望使用 <SdkToolsPath>
进行设置,但这不起作用.在 Microsoft.Common.targets 中,SdkToolsPath 是从 TargetFrameworkSDKToolsDirectory 设置的,所以我尝试了它并且它起作用了.这是在 Visual Studio 2015 上,从 ant 调用 msbuild.
I previously expected to set this using <SdkToolsPath>
, but that didn't work. In Microsoft.Common.targets, SdkToolsPath gets set from TargetFrameworkSDKToolsDirectory, so I tried that and it worked. This is on Visual Studio 2015, and msbuild being called from ant.