Where to get the version of the running .Net Framework?

  • Thread starter Thread starter Matthias S.
  • Start date Start date
M

Matthias S.

Hi,

how do I retrieve the version of the running CLR/Framework at runtime?

Thanks in advance!
 
There is no framework running, there are frameworks installed. There are
multiple ways to get the version, the easiest that comes to mind is

Console.WriteLine(System.Runtime.InteropServices.RuntimeEnvironment.GetSyste
mVersion()) ;

;)

- Sahil Malik
You can reach me thru my blog at
http://www.dotnetjunkies.com/weblog/sahilmalik
 
Sahil Malik said:
There is no framework running, there are frameworks installed.

There can be multiple versions of the framework installed. What was asked
for is the version of the one that is currently running.
 
Matthias,
In addition Sahil's suggestion, you may try System.Environment.Version.

Environment.Version returns a System.Version object, while
RuntimeEnvironment.GetSystemVersion returns a string.

Hope this helps
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top