1

构建时出现此错误:

Duplicate 'EmbeddedResource' items were included. 
The .NET SDK includes 'EmbeddedResource' items from your project directory by default. 
You can either remove these items from your project file, or set the 'EnableDefaultEmbeddedResourceItems' property to 'false' if you want to explicitly include them in your project file. For more information, see https://aka.ms/sdkimplicititems. 
The duplicate items were: 'WasmCSS\Fonts.css'
XamNote.Wasm    C:\Program Files\dotnet\sdk\3.1.202\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets   306 

应该怎么做才能修复这个错误?

4

1 回答 1

2

她也一样,只是放松她的指示 https://platform.uno/xamarin-forms/

首先,它生成了 Wasm 项目,但无法将其添加到 sln 中,所以我手动添加了它,然后当我尝试构建 Wasm 时,出现此错误

严重性代码 描述 项目文件行抑制状态错误 NETSDK1022 包含重复的“EmbeddedResource”项目。默认情况下,.NET SDK 包含项目目录中的“EmbeddedResource”项。您可以从项目文件中删除这些项目,或者如果要将它们明确包含在项目文件中,则将“EnableDefaultEmbeddedResourceItems”属性设置为“false”。有关详细信息,请参阅https://aka.ms/sdkimplicititems。重复的项目是:'WasmCSS\Fonts.css' TestingWebAssXamarin.Wasm C:\Program Files\dotnet\sdk\3.1.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets 306

Visual Studio 版本 16.6.0 xamarin 来自 4.6.0.800

于 2020-06-01T11:53:48.337 回答