我已经打开issue在 NuGet 网站上。
问题似乎出在解决方案中的 C++ 通用应用程序库,我在其中尝试运行 nuget Restore
命令。我收到以下错误:
项目文件“SparkiyEngine.Language.Lua\SparkiyEngine.Language.Lua.Shared\SparkiyEngine.Language.Lua.Shared.vcxitems”采用“.vcproj”文件格式,MSBuild 不再支持该格式。请通过在 Visual Studio IDE 中打开项目或运行转换工具来转换项目,或者使用 MSBuild 3.5 或更早版本来生成它。
错误消息中提到的项目是 WinRT C++ Lib 的 Shared
项目。
我可以在命令中添加一些内容来绕过该项目或忽略它吗?
最佳答案
将以下配置文件放在 nuget.exe
旁边
nuget.exe.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Build" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Build.Engine" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Build.Framework" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
关于msbuild - C++通用应用程序在解决方案中时NuGet恢复.vcxitems错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27572334/