Reputation: 514
How do I find out what .net runtime a dll is built upon programmatically?
Thanks
Upvotes: 4
Views: 1477
Reputation: 1413
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.
Upvotes: 4