Date: 05.05.15 - 2:59pm
If you have a .Net binary and want to know what version of the framework it targets from native code the following may help.
it may however have an issue
The function has also been depreceated by MS but still included it appears. below is for VB6.
ok actually in a little more testing..I dont think this function is returning what I really want. Observe the following screen shots, for this binary, the api above is returning the 2.0xxx value for the runtime version of the native dlls, but in the config it was specified to use .net 3.5. In the second screen shot, you can see the .net 4.0 was loaded.
I want the target framework, not the runtime version, so I guess I would have to parse the CLR assembly metadata tables yuk! The runtime version does not change even if you compile the target framework as 2.0.
Click on the images to enlarge.