Xamarin.Forms Could not resolve type with token 01000014

使用Visual Studio在開發 Xamarin.Forms 發生錯誤一般都會以為是編譯器秀逗所以直覺就是直接重建,但重建依然抱錯 詳細看了一下錯誤內容

System.TypeLoadException: 'Could not resolve type with token 01000014 from typeref (expected class 'Xamarin.Forms.Xaml.Diagnostics.VisualDiagnostics' in assembly 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null')' 

發現是Xamarin.Forms版本存在差異,解決辦法是分別檢查C#、Android、IOS的套件版本是否相同。
相依性(參考) -> 右鍵單擊 -> 管理NuGet套件

然後再進行清除和重建即可解決此問題。

關於作者 碼農Roy

曾經北漂的工程師,現在專注於.Net Core、WordPress開發


發佈留言