4

How do I find out what .net runtime a dll is built upon programmatically?

Thanks

c830
  • 494
  • 1
  • 6
  • 15
  • possible duplicate of [Determine framework (CLR) version of assembly](http://stackoverflow.com/questions/2310701/determine-framework-clr-version-of-assembly) – Richard Aug 05 '10 at 14:29

1 Answers1

4

The Assembly.GetAssembly method returns an Assembly that has an Assembly.ImageRuntimeVersion property. That property's description says, "Gets a string representing the version of the common language runtime (CLR) saved in the file containing the manifest."

I think that's what you're after.

Tim Goodman
  • 22,127
  • 7
  • 60
  • 81
shawndumas
  • 1,377
  • 14
  • 17