0

when i use dumpbin \clrheader to one assembly, i found following content- Since i complied under .net4.5,How the CLR verion would be 2.05?

Dump of file SampleApp.exe

File Type: EXECUTABLE IMAGE

clr Header:

          48 cb
        2.05 runtime version
        2080 [     668] RVA [size] of MetaData Directory
       20003 flags
               IL Only
               32-Bit Required
               32-Bit Preferred
     6000001 entry point token
           0 [       0] RVA [size] of Resources Directory
           0 [       0] RVA [size] of StrongNameSignature Directory
           0 [       0] RVA [size] of CodeManagerTable Directory
           0 [       0] RVA [size] of VTableFixups Directory
           0 [       0] RVA [size] of ExportAddressTableJumps Directory
           0 [       0] RVA [size] of ManagedNativeHeader Directory

Summary

    2000 .reloc
    2000 .rsrc
    2000 .text
  • Looks like it just lifts the `MajorRuntimeVersion` and `MinorRuntimeVersion` from the CLI Header (ECMA-335 Partition II Section 25.3.3). Unfortunately the specification doesn't seem provide any guidance of how they should be set or used other than being 'currently' 2 and 0 respectfully (6th edition from June 2012 - the most recent version I have seen). I suspect it has more to do with how the header should be interpreted rather than the .NET version. – Brian Reichle May 03 '16 at 22:18

1 Answers1

0

Because what's referred to as the "runtime version" by this tool is not actually the runtime version and has little to do with it. It's a misnomer. You cannot use dumpbin to print the actual runtime version. Instead, you can use ildasm which refers to the runtime version as the "metadata version." You can find the metadata version in the manifest of the assembly. For .NET 4.x, the runtime version is 4.0.30319.

Hadi Brais
  • 22,259
  • 3
  • 54
  • 95