Pretty new to C# and Visual Studio. I started with a .exe that needed modification, decompiled it in .NET Reflector, then opened the Assembly in Visual Studio 2015. I have made my change and clicked "Build" and now I get two errors with code "CS0579... Description: Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute" (the second is the same but without 'global::')
I don't have a reputation of 10 yet, so I cannot post my screenshot.
Need to get past this. any Help is welcome. Thanks!
Run the gcc command to compile your C program. The syntax you'll use is gcc filename. c -o filename.exe . This compiles the program and makes it executable.
Usually, a first compiler is written in another language (directly in PDP11 assembler in this case, or in C for most of the "modern" languages). Then, this first compiler is used to program a compiler written in the language itself. You can read this page about the history of the C language.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With