1>LINK:致命错误 LNK1104:无法打开文件 'MSCOREE.lib'`

1>LINK : fatal error LNK1104: cannot open file 'MSCOREE.lib'`

我一直收到这个错误

1>Main.obj : MSIL module encountered; incremental linking is disabled for MSIL; performing full link 1>LINK : fatal error LNK1104: cannot open file 'MSCOREE.lib'

我禁用了两阶段,我在 visual studio 上使用 cli 和 clr。 我在程序中也没有任何其他代码。 这是 c++ 顺便说一句

  1. 安装.net sdkhttps://dotnet.microsoft.com/download/visual-studio-sdks
  2. 添加到系统环境取决于你的.net版本
NETFXKitsDir=C:\Program Files (x86)\Windows Kits\NETFXSDK.8\
NETFXSDKDir=C:\Program Files (x86)\Windows Kits\NETFXSDK.8\

或项目的库

C:\Program Files (x86)\Windows Kits\NETFXSDK.8\Lib\um\x86 or x64 or arm