更新时间:2022-04-30 10:36:03
事实证明,您可以直接在.csproj文件中指定SDK的路径:
It turns out you can specify the path to the SDK directly in the .csproj file:
<TargetFrameworkSDKToolsDirectory>C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools</TargetFrameworkSDKToolsDirectory>
,然后该版本以这种方式找到了lc.exe.
and the build found lc.exe that way.
我以前曾期望使用<SdkToolsPath>
进行设置,但这没有用.在Microsoft.Common.targets中,从TargetFrameworkSDKToolsDirectory设置了SdkToolsPath,所以我尝试了一下并成功了.这是在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.