Xamarin.Formsアプリが特定のページを開くとクラッシュするクラッシュは再現可能ですが、リリースモードでのみ発生します。ビルドし、デバッグモードでアプリケーションを実行すると、同じページが正常に開きます。Xamarin.FormsアプリがInitializeComponentのFileNotFoundExceptionでクラッシュする
私はいくつかの努力を払って、アプリケーションが閉じられる前に、例外をキャッチしてスタックトレースをメッセージウィンドウに表示することができました。
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime' or one of its dependencies
File name: 'System.Runtime'
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity)
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef)
at (wrapper remoting-invoke-with-check) System.AppDomain:Load (System.Reflection.AssemblyName)
at System.Reflection.Assembly.Load (System.Reflection.AssemblyName assemblyRef)
at Xamarin.Forms.Xaml.XamlParser.GetElementType (Xamarin.Forms.Xaml.XmlType xmlType, IXmlLineInfo xmlInfo, System.Reflection.Assembly currentAssembly, Xamarin.Forms.Xaml.XamlParseException& exception)
at Xamarin.Forms.Xaml.CreateValuesVisitor.Visit (Xamarin.Forms.Xaml.ElementNode node, INode parentNode)
at Xamarin.Forms.Xaml.ElementNode.Accept (IXamlNodeVisitor visitor, INode parentNode)
at Xamarin.Forms.Xaml.RootNode.Accept (IXamlNodeVisitor visitor, INode parentNode)
at Xamarin.Forms.Xaml.XamlLoader.Visit (Xamarin.Forms.Xaml.RootNode rootnode, Xamarin.Forms.Xaml.HydratationContext visitorContext)
at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.String xaml)
at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.Type callingType)
at Xamarin.Forms.Xaml.Extensions.LoadFromXaml[TXaml] (Xamarin.Forms.Xaml.TXaml view, System.Type callingType)
at MyApp.MyNamespace.Pages.MyPage.InitializeComponent()
at MyApp.MyNamespace.Pages.MyPage..ctor()