1
votes

When building I'm getting this error:

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 

What should be done to fix this error ?

1
Can you indicate the steps you followed to get there ? Also, which version of visual studio are you using ? - Jérôme Laban
Hi @JeromeLaban thanks for editing my messy First question in StackOverFlow 😂 Well i just added the UNO WASM to my Xamarin.Forms (4.6) project in Visual Studio 2019 16.5.5 Which uses the MasterDetail Template, a Custom font, RG.Popup.Plugin that supports UWP, a Local DataBase with sqilite-net-pcl and i really don't know why it yells at WasmCSS\Fonts.css in EveryProject. hope this was the info that i should tell you :( - mh r
Does it happen if you follow the getting started, using a basic xamarin.forms app ? - Jérôme Laban
No but it stocks on SplashScreen in both MasredDetail Template using XF 4.6(a new project with nothing more) and a blank project using XF 4.4 . this Duplicate 'EmbeddedResource' error only happens when i add it to an existing one. - mh r

1 Answers

2
votes

Same thing her , just fallow the instruction her https://platform.uno/xamarin-forms/

first thing , it generate the Wasm project but could not add it to the sln , so i added it manually then when i try to build Wasm , got this error

Severity Code Description Project File Line Suppression State Error NETSDK1022 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' TestingWebAssXamarin.Wasm C:\Program Files\dotnet\sdk\3.1.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets 306

visual studio Version 16.6.0 xamarin froms 4.6.0.800