【发布时间】:2015-12-17 20:50:21
【问题描述】:
我有一个可以在 Android 上成功运行的 Xamarin PCL。我按照说明将 Windows 通用项目添加到此处找到的解决方案:
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.
当我构建我的 x64 项目时,我收到了相同的构建警告,但例外是
An exception of type 'System.NotImplementedException' occurred in App1.Interop.dll but was not handled in user code
Additional information: Arg_NotImplementedException
如何确保编译参考。我唯一的参考是说明中的 NuGet 包,即 Xamarin.Forms。
【问题讨论】:
标签: xamarin reference uwp portable-class-library