How to find what version of the framework is installed

A

Avi

Hello everybody,

I wrote a small application in C# and I would like the
application to show the user what version/s of .NET
framework is/are installed on his computer.

What will be the best way to find it out (from the code)

I know these two places
1.
C:\WINNT\Microsoft.NET\Framework\v1.0.3705
2.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy

But i am looking for a better solution

Thanks a lot,
Avi
 
G

Günter Prossliner

The Version of the framework is equal to the version of the mscollib
assembly:

Version frameworkVersion = typeof(string).Assembly.GetName().Version;

GP
 

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

Top