“无法创建WindowsPage实例"

“无法创建WindowsPage实例

问题描述:

我创建了一个Xamarin.Forms跨平台应用程序模板. 现在,我在UWP项目中收到无法创建WindowsPage实例"错误. 注意:我尚未对模板进行任何更改. 错误屏幕截图

I created a Xamarin.Forms cross-platform application template. Now I am getting "Cannot create instance of WindowsPage" error in the UWP project. Note: I have not made any changes to the template. Error Screenshot

对于我而言,该错误不会阻止项目的编译,仅当在编辑器中打开MainPage.xaml文件时才会出现该错误.因此,我建议您在构建解决方案之前关闭该文件,该错误将消失.

In my case the error does not prevent the project from compiling and only appears if the MainPage.xaml file is open in the editor. So I would suggest that you close that file prior to building your solution and the error will go away.

无论如何,我希望能有所帮助.

Anyway, I hope that helps.