【发布时间】:2017-05-13 05:30:33
【问题描述】:
我正在 MVVM 中编写应用程序。 我的 MainPage.xaml 看起来像这样:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:view="using:FIARView"
xmlns:controls="using:DLToolkit.Forms.Controls;assembly=DLToolkit.Forms.Controls.FlowListView"
x:Class="clr-namespace:FIARView.MainPage">
...
我在这个 xaml 文件中使用的所有内容都有一个错误: 例如:
Unknown type 'ContentPage' in XML namespace 'http://xamarin.com/schemas/2014/forms'
Unknown type 'Button' in XML namespace 'http://xamarin.com/schemas/2014/forms'
等等。 我试图寻找答案,但没有找到。我该如何解决这个问题?
【问题讨论】:
-
您是否引用了 Xamarin 库?
-
是的,我参考了 Xamarin.Forms.Core、Platform、Platform.WinRT 和 Xamarin.Forms.Xaml。
-
然后尝试构建;听起来您只是在启动项目方面遇到了问题。
-
清理和重建整个解决方案没有帮助。