tags:

views:

59

answers:

2

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

Thanks

+3  A: 

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.

shawndumas
@Tim Goodman: good man. Thanks for the edit.
shawndumas
Happy to help :)
Tim Goodman
A: 

Here is the relevant answer http://stackoverflow.com/questions/2310701/determine-framework-clr-version-of-assembly you probably cannot do this without external process invokation..

Alex Krupnov