Task could not find “LC.exe” using SdkToolsPath

后端 未结 4 1470
轮回少年
轮回少年 2021-01-14 16:55

I have cloned a project to my computer using TFS, when I build the project I get this error :

Error 6 Task could not find \"LC.exe\" using the SdkT

4条回答
  •  囚心锁ツ
    2021-01-14 17:11

    It turns out you can specify the path to the SDK directly in the .csproj file:

    C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools
    

    and the build found lc.exe that way. So do a dir /s for lc.exe and use that path.

    I previously expected to set this using , but that didn't work. In Microsoft.Common.targets, SdkToolsPath gets set from TargetFrameworkSDKToolsDirectory, so I tried that and it worked. (It would be nice if the variable name corresponded 1 to 1, but they don't.)

    This is on Visual Studio 2015, and msbuild being called from ant.

提交回复
热议问题