【问题标题】:App.Xaml.cs and MainPage.xaml.cs cannot be included in Solutions Explorer of Visual Studio Community 2017App.Xaml.cs 和 MainPage.xaml.cs 不能包含在 Visual Studio Community 2017 的解决方案资源管理器中
【发布时间】:2018-12-06 15:50:37
【问题描述】:

App.Xaml.cs 和 MainPage.xaml.cs 不能包含在我的 Xamarin 应用程序的 Visual Studio Community Edition 2017 解决方案资源管理器中,而它们位于 Windows 的包含文件夹中。

【问题讨论】:

  • 错误很明显。如果 App() 类存在,请按 CTRL+。查看可用选项列表并相应地引用该类。

标签: c# xaml visual-studio-2017


【解决方案1】:

错误说,它无法在 Xamarin Forms 项目中找到 App()。在您共享的图像中,没有 App.xaml 及其 .cs 类文件。因此,从 Android 和 iOS 项目调用 LoadApplication(new App()) 时,会引发错误。

如果它在 Windows 文件夹中可用,您可以删除这些文件并尝试在 Forms 项目中添加一个新的 App.xaml 文件。完成后,您可以清理解决方案并进行重建。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-24
    • 2019-08-08
    • 2015-03-03
    • 1970-01-01
    • 2018-04-27
    • 1970-01-01
    相关资源
    最近更新 更多