Severity Code Description Project File Line Suppression State Error CS0579 Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute code example

Example 1: Error CS0579 Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute MyUIApp D:\MyUIApp\obj\Debug\netcoreapp3.1\.NETCoreApp,Version=v3.1.AssemblyAttributes.cs 4 Active

Error  CS0579  Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute    MyUIApp
D:\MyUIApp\obj\Debug\netcoreapp3.1\.NETCoreApp,Version=v3.1.AssemblyAttributes.cs   4   Active

Example 2: while coding c# i get the error : "Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute [first_better_project]"

<ItemGroup>
  <DefaultItemExcludes>$(DefaultItemExcludes);obj/**</DefaultItemExcludes>
</ItemGroup>