Maz*_*zzy 8 visual-studio xamarin xamarin.forms
尝试Content Page在visual studio中添加解决方案时,会发生以下错误:
Exception of type 'System.Exception' was thrown.
The project system has encountered an error.
Did not find new element in the hierarchy for item `Views\MyPage.xaml`.
The item would have been added with type "Page".
The project item schema service knows about this item type.
The item does exist in the project file.
Run Code Online (Sandbox Code Playgroud)
添加文件时,我执行以下操作:
Right click on Views in my Xamarin Solution > Add > New Item > Content Page > Add
查看Windows资源管理器时,会创建一个文件,MyPage.xaml但尚未创建MyPage.xaml.cs,并且未将其添加到解决方案中
这是一个空白的Xamarin共享项目,这个错误一直在发生......
它让我疯狂,因为我甚至无法添加单页
作为一种解决方法,我使用W. explorer手动添加文件,然后手动编辑app.projitems,但这简直太荒谬了.
作为一个肮脏的解决方法,直到解决这个问题,将"手动"文件添加到项目中可以完成工作.
关闭Visual Studio,
现在在VS中打开解决方案并重建 - 它应该看起来和构建正常.
| 归档时间: |
|
| 查看次数: |
1639 次 |
| 最近记录: |