Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I know which version of the .NET Framework my program is running on?

Tags:

.net

clr

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?

like image 430
halivingston Avatar asked Dec 18 '22 04:12

halivingston


1 Answers

Different options are:

  • Check the value of Environment.Version
  • typeof (int).Assembly.GetName ().Version: this will give you the running mscorlib.dll assembly version.
  • Use Process Explorer if you can't change the code. Then check which version of mscorlib is loaded and from where.
like image 129
Gonzalo Avatar answered Dec 30 '22 11:12

Gonzalo