为什么我的引用没有在 Xamarin Windows Universal PCL 中编译?

Why is my reference not being compiled in Xamarin Windows Universal PCL?

我有一个 Xamarin PCL 可以成功地与 Android 一起工作。我按照说明将 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 2.0 Nuget 包添加到通用项目中,但我的便携式 Class 库项目设置为 1.0。我将我的便携式 Class 库 Xamarin Nuget 包更新为 2.0 然后它 运行 只是花花公子。