.net - UWP 在调试模式下编译,而不是发布模式/.NET 本机工具链 ILT0005
问题描述
我有一个依赖于多个包(如模板 10、EF Core、NewtonSoft)和类库的 UWP 项目<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
在调试模式下运行时一切正常,当尝试在发布模式下构建或使用 .NET 本机工具链时,我收到以下错误:
ILT0005: 'C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86.microsoft.net.native.compiler\2.1.8\tools\x86\ilc\Tools\nutc_driver.exe @"C:\Source\Repos-2017-software\eVend\eVend\eTouchRetail\obj\x86\Debug\ilc\intermediate\MDIL\eTouchRetail.rsp"' returned exit code -1073740791
还有多个错误,如下所示,用于不同的Types
and Methods
:
Type 'Windows.UI.Xaml.Controls.RefreshContainer' from assembly 'Windows.Foundation.UniversalApiContract' was not included in compilation, but was referenced in type 'Microsoft.Toolkit.Uwp.UI.Controls.PullToRefreshListView'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
我在错误窗口中看到很多警告,如下所示,针对不同的命名空间:
The referenced component 'C:\Users\shaun\.nuget\packages\netstandard.library\2.0.2\build\netstandard2.0\\ref\System.Linq.Expressions.dll' could not be found.
这里发生了什么?我该如何诊断?
解决方案
推荐阅读
- python - Python海龟图形占用大量内存
- c++ - 如何在 Ubuntu 18.04.3 上“升级”到 OpenGL 3.3
- javascript - 使用 js 承诺的复杂决策树
- java - 我怎样才能让 Gui 像这张照片一样
- sql - SQL Server:查询性能优化
- reactjs - _react2.fireEvent.change 不是函数 | 反应测试库
- arduino - 保存多于 2 位小数的浮点数
- javascript - 避免输入错误时删除空格
- swift - 显示另一个窗口时应用程序崩溃,但仅在未调试时
- python - 如何解决期望值:第 1 行第 1 列(字符 0)?