将 Xamarin 项目转换为 .net MAUI 时出现“错误 CS0579:重复‘global::Android.Runtime.Resource DesignerAttribute’属性”

Utk*_*war 7 android xamarin.android xamarin

我创建了一个示例 Xamarin 项目,并尝试使用以下步骤将其转换为 Maui 项目(https://github.com/dotnet/maui/wiki/Migration-from-Xamarin.Forms-(Preview)),但它显示错误:-

error CS0579: Duplicate 'global::Android.Runtime.Resource DesignerAttribute' attribute 
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

小智 9

我能够通过删除残留的 Resources\Resource.designer.cs 文件来解决此问题。另请确保注释掉 Properties\AssemblyInfo.cs 中的所有内容