首页 > 解决方案 > 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

还有多个错误,如下所示,用于不同的Typesand 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.       

这里发生了什么?我该如何诊断?

标签: .netvisual-studiobuilduwp

解决方案


推荐阅读