Reputation: 3895
I have a program which I believe to be running in .NET 4.0, but I am unable to mixed-mode debug it (something new .net 4.0 for 64-bit application)
I wanted to confirm if I'm truly running in .NET 4.0 or is it running .NET 3.5
Is there a way to look in the memory space or something?
Upvotes: 4
Views: 4027
Reputation: 64248
This returns the .Net runtime version as a string:
System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion()
You can also get the install directory as well:
System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
Upvotes: 1
Reputation: 5836
typeof(int).Assembly.ImageRuntimeVersion will give you the version of the mscorlib assembly loaded in your process.
Upvotes: 1
Reputation: 21175
Different options are:
Upvotes: 10