2015-12-17 58 views
0

我有一個Xamarin PCL,可以在Android上成功運行。我跟着指示到Windows通用項目添加到在這裏找到了解決辦法:爲什麼我的參考文獻沒有在Xamarin Windows Universal PCL中編譯?

https://developer.xamarin.com/guides/cross-platform/xamarin-forms/windows/getting-started/universal/

但我運行它有問題。

當我建我的項目的x86我得到警告:

warning : Method 'project.ctor()' will always throw an exception due to the missing method 'ImageSource.FromResource(string)'. There may have been a missing assembly. 

然後,當我運行代碼,我得到異常

Additional information: Method 'ImageSource.FromResource(string)' was not included in compilation, but was referenced in SturgisMainPage..ctor(). There may have been a missing assembly. 

當我建我的項目64,我得到了相同的構建警告,但例外是

An exception of type 'System.NotImplementedException' occurred in App1.Interop.dll but was not handled in user code 

Additional information: Arg_NotImplementedException 

如何確保編譯參考。我唯一的參考是在Xamarin.Forms的說明中的NuGet Package。

回答

0

在添加參考步驟中,我將Xamarin 2.0 Nuget Package添加到Universal Project,但我的Portable Class Library項目設置爲1.0。我更新了我的便攜式類庫Xamarin Nuget包到2.0,然後它運行只是花花公子。