簡體   English   中英

Xamarin.Forms UWP項目使用.Net Native編譯時會引發異常

[英]Xamarin.Forms UWP project throws exception when compiled with .Net Native

我有UWP Xamarin.Forms項目,在我的UWP項目中啟用了“使用.NET本機工具鏈編譯”選項,但是在運行應用程序時,它拋出以下錯誤:

System.Reflection.MissingMetadataException:“ Xamarin.Forms.Platform.UWP.WindowsPlatformServices”缺少元數據。 有關更多信息,請訪問http://go.microsoft.com/fwlink/?LinkID=392859 '

另外,我在default.rd.xml文件中添加了以下幾行:

<Type Name="System.EventHandler" Dynamic="Required All" /> 
 <Namespace Name="System.Reflection" Serialize="Required All" />
 <Namespace Name="System.Private.Reflection.Core" Serialize="Required All" />

通過在default.rd.xml文件中添加以下default.rd.xml行來解決此問題。

<Type Name="Xamarin.Forms.Platform.UWP.WindowsPlatformServices" Serialize="Required All" /> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM