How to find what version of the framework is installed

  • Thread starter Thread starter Avi
  • Start date Start date
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
 
The Version of the framework is equal to the version of the mscollib
assembly:

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

GP
 
Back
Top