title: Error CS0579 Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute'
body: <p>When I build my application I get the following error</p>
  
  <pre><code> Error  CS0579  Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute    MyUIApp
  D:\MyUIApp\obj\Debug\netcoreapp3.1\.NETCoreApp,Version=v3.1.AssemblyAttributes.cs   4   Active
  </code></pre>
  
  <p>The following code is autogenerated in the obj/Debug/netcoreapp3.1 folder</p>
  
  <p>// 
      using System;
      using System.Reflection;
      [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]</p>
  
  <p>I have a project file starting with </p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"&gt;
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;netcoreapp3.1&lt;/TargetFramework&gt;
      &lt;OutputType&gt;Library&lt;/OutputType&gt;
      &lt;SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'"&gt;..\&lt;/SolutionDir&gt;
      &lt;GenerateAssemblyInfo&gt;false&lt;/GenerateAssemblyInfo&gt;
      &lt;RestorePackages&gt;true&lt;/RestorePackages&gt;
      &lt;UseWindowsForms&gt;true&lt;/UseWindowsForms&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup&gt;
  </code></pre>
  
  <p>I can work around the issue by commenting out the contents of the file, but not by deleting the file.</p>