jbevain / cecil

Cecil is a library to inspect, modify and create .NET programs and libraries.
MIT License
2.74k stars 624 forks source link

Add support for newer runtimes #835

Closed deeprobin closed 2 years ago

deeprobin commented 2 years ago
    public enum TargetRuntime {
        Net_1_0,
        Net_1_1,
        Net_2_0,
        Net_4_0,
+             NetStandard2_0,
+             NetStandard2_1,
+             NetCore1_0,
+             NetCore1_1,
+             NetCore2_0,
+             NetCore2_1,
+             NetCore2_2,
+             NetCore3_0,
+             NetCore3_1,
+             Net5,
+             Net6,
+             Net7,
    }
teo-tsirpanis commented 2 years ago

Hello @deeprobin, the TargetRuntime enum does not signify the assembly's target frameowrk; this is actually stored in a System.Runtime.Versioning.TargetFrameworkAttribute. The enum is a compatibility vestige that should simply be set to Net_4_0 for .NET Framework 4.0 and all frameworks after it.