2019-1-16-win10-uwp-发布的时候-ILC-编译不通过

title author date CreateTime categories
win10 uwp 发布的时候 ILC 编译不通过
lindexi
2019-1-16 20:37:5 +0800
2019-01-16 20:34:54 +0800
Win10 UWP

本文告诉大家如果在 UWP 发布的时候遇到 ILC 的问题可以如何解决

在 UWP 的发布中,需要通过 ILC 将代码编译为 Native 代码,但是在发布的 Microsoft.NETCore.UniversalWindowsPlatform 的 6.2.2 或 6.2.3 版本会让 ILC 无法编译

在编译的时候出现下面代码

microsoft.net.native.compiler2.2.1toolsMicrosoft.NetNative.targets(905,5): error : ILC 遇到了一个错误。请参阅 http://go.microsoft.com/fwlink/?LinkID=392869 处的 .NET Native 兼容性文档和支持信息以获取帮助

或者

ilc.exe”已退出,代码为 539754340

可以通过 Nuget 将 Microsoft.NETCore.UniversalWindowsPlatform 的版本修改为 6.1.9 解决

.NET Native 可以看到最新的只是支持 UWP 的 6.1.x 的版本

.net native 2.2 + UWP project build fail - Developer Community

打开 http://go.microsoft.com/fwlink/?LinkID=392869 链接可以看到 Migrating Your Windows Store App to .NET Native

通过命令行编译的方法

win10 uwp 使用 msbuild 命令行编译 UWP 程序

原文地址:https://www.cnblogs.com/lindexi/p/12085854.html