タイトルの通り。昨日までは普通に動いていたはずなのに、画面を表示しようとしてエラーはいたわってことがあったのでまとめます。
そもそも何が起きたか
PageとかのコンストラクタでInitializeComponent またお前かよんでるところありますよね。
private void InitializeComponent() {
global::Xamarin.Forms.Xaml.Extensions.LoadFromXaml(this, typeof(TopPage));
}
このLoadFromXamlってところでSystem.TypeLoadExceptionが発生。。以下詳細
$exception {"Could not load type 'Xamarin.Forms.Xaml.XamlFilePathAttribute' from assembly 'Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'.":"Xamarin.Forms.Xaml.XamlFilePathAttribute"} System.TypeLoadException
解決策
まぁひたすらクリーンしたりしたのですが、改善されず。
答えはNugetのバージョンにあった。
参考:The type or namespace name XamlFilePathAttribute does not exist in the namespace Xamarin.Forms.Xaml
iOSとAndroidはXamarin.Formsのバージョンをあげていたのですが(実装の都合上)、
UWPはあげていなかった。。ただそれだけのこと。
あげたら無事動くようになりました。感謝。