【问题标题】:Release build fails with microsoft .net native 1.7使用 microsoft .net native 1.7 发布构建失败
【发布时间】:2017-10-30 19:38:13
【问题描述】:

我在构建要发布的 uwp 项目时出错,输出如下:

1>  Generating native code
1>  Generating fixups for native code
1>C:\Users\τασος\.nuget\packages\microsoft.net.native.compiler\1.7.0\tools\Microsoft.NetNative.targets(697,5): error : RHBIND : error RHB0016: Import of '' failed: bad file extension (must be .obj or .lib).
1>C:\Users\τασος\.nuget\packages\microsoft.net.native.compiler\1.7.0\tools\Microsoft.NetNative.targets(697,5): error : ILT0005: 'C:\Users\τασος\.nuget\packages\microsoft.net.native.compiler\1.7.0\tools\x64\ilc\Tools\rhbind.exe @"C:\Users\τασος\Documents\Visual Studio 2015\Projects\AuebUnofficial\AuebUnofficial\obj\x64\Release\ilc\intermediate\rhbindargs.ΟΠΑ-AUEB.rsp"' returned exit code 16
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

还有线条

<LoggerBasedExecTask 
      Condition="'$(UseDotNetNativeLogger)'=='true'"
      Application="$(_IlcExePath)" 
      Parameters="$(_IlcInvocationParameters)" 
      MessageLog="$(_IlcIntermediateRootPath)ilclog.csv"
      UseCommandProcessor="false" 
      >
      <Output TaskParameter="ExitCode" PropertyName="_IlcExitCode" />
    </LoggerBasedExecTask>

我不知道错误在哪里,但这是巨大的。每次打开 vs2017 都会发现一个新的 bug……

【问题讨论】:

标签: uwp visual-studio-2017 .net-native


【解决方案1】:

解决方案是将Microsoft.NETCore.UniversalWindowsPlatform nugget 包降级为5.2.2。之后,我可以为商店创建 .appxs 或在 Release 上构建。

【讨论】:

  • 5.4.0 也能正常工作但是这个问题让我不得不“从头开始”重新创建应用程序以将其更新到最新的平台包
  • 我认为该问题存在于该库的某些版本中。或者它可能只是 .nuget 文件夹中的缓存问题。不管怎样都是痛苦的
  • 删除 .vs 文件夹,然后在 Visual Studio 2019 中打开项目为我做了。
猜你喜欢
  • 2021-06-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多