Xamarin 构建错误 'cxmlns' 是未声明的前缀

Xamarin build error 'cxmlns' is an undeclared prefix

我正在尝试构建我的 Xamarin.Forms 项目和 运行 时出现意外错误“'cxmlns' 是未声明的前缀。第 3 行,位置 14”。我试过在网上搜索解决方案,但没有解决任何问题。我见过其他类似的问题,我尝试过对其他人有用的解决方案,但到目前为止对我的情况没有任何效果。这是我的 MainPage.xaml 代码:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         cxmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         xmlns:local="clr-namespace:DojoBoss"
         x:Class="DojoBoss.MainPage"
         BackgroundImage="background1">

</ContentPage>

我发现出现此错误很奇怪,因为这是 Visual Studio (VS) 空白应用程序附带的所有股票代码,除了我放入背景图像的 1 行。这在今天早些时候也能正常工作,我没有做任何更改,但现在它不起作用了。到目前为止,我对 VS 和 Xamarin 感到很失望,它们似乎有很多错误并且很难上手。到目前为止,这是我尝试过的方法:

VS 还给我 4 个可能与问题相关的其他错误:

我不知道这是什么"cxmlns"。我们可以更改此行吗

cxmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"

xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"