msbuild - C++通用应用程序在解决方案中时NuGet恢复.vcxitems错误

标签 msbuild nuget win-universal-app c++-cx nuget-package-restore

我已经打开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 项目。

我可以在命令中添加一些内容来绕过该项目或忽略它吗?

有用的链接: Project , CI

最佳答案

将以下配置文件放在 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/

相关文章:

msbuild - 在构建步骤中访问 TeamCity 工件

asp.net - 如何在 ASP.NET 部署脚本中包含应用程序池规范?

nuget - 如何查看 Nuget Feed 的 URL?

servicestack - 为什么 ServiceStack.Text 没有被复制到 Bin?

c# - 为 Windows 10 UWP 应用程序在桌面上设置窗口大小

c# - 如何在 Windows Phone 8.1 中显示辅助磁贴的 BackContent

visual-studio - Visual Studio构建窗口中的1>和2>是什么?

用于 C# 库的 C++/CLI 库的 NuGet 包

wpf - Windows 10 UWP - Windows Phone 模拟器上的空白

c# - Powershell:二进制模块与脚本模块