Microsoft.NetNative编译导致警告ILT0003

时间:2019-07-04 22:06:36

标签: xamarin.forms uwp

我正在尝试使用Xamarin.Forms构建我的第一个UWP应用。但是,当我在发布版本中进行编译时,总是会遇到这类错误,并且在此状态下启动应用会导致启动屏幕锁定。

3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'FormsApp.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'DarkThemeResources.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'DefaultThemeResources.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'LightThemeResources.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'ContactPage.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'DataPrivacySettingsPage.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'HelpPage.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'ImageViewerPage.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'InAppPurchasingPage.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'InformationPage.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'LegalContentPage.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0005: Type 'Xamarin.Forms.CheckBox' from assembly 'Xamarin.Forms.Core' was not included in compilation, but was referenced in method 'MapDownloadPage.InitializeComponent()'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'MapPage.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'MasterPage.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'SettingsPage.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'StatisticPage.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'WebViewPage.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\2.2.3\tools\Microsoft.NetNative.targets(801,5): warning : ILTransform : warning ILT0003: Method 'MainMenuViewCell.InitializeComponent()' will always throw an exception due to the missing method 'ResourceLoader.ResourceLoadingQuery.set_Instance(object)' in assembly 'Xamarin.Forms.Core'. There may have been a missing assembly, or a dependency on a more recent Windows SDK release.
3>  Cleaning up unreferenced code
3>  Generating native code
3>  Generating fixups for native code

我不知道该错误怎么办。我可以避免这种错误吗?还是只需要避免“使用.NET本机工具链编译”选项?

0 个答案:

没有答案