How to compile c# csproj into exe in Visual Studio 2015 - error CS0579
You should delete this entire line from AssemblyInfo.cs:
[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.0,Profile=Client", FrameworkDisplayName=".NET Framework 4 Client Profile")]
I had today the error CS0579 related to some AssemblyInfo and TargetFrameworkAttribute duplicated values. Using sdk 3.1.301 and targetting netcoreapp3.1 and with some other projects targeting netstandard2.1
Using this:
<PropertyGroup>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
</PropertyGroup>
And deleting /bin & /obj fixed my build.