.NET Framework Developer Center > .NET Framework Forums > .NET Framework Setup > check .Net frame work version from windows

Answered check .Net frame work version from windows

  • Monday, November 19, 2007 12:06 AM
     
     
    Hi,
    How can I check if the .net frame work is installed on a PC or not ?
    and if installed , how can i know the version from the Windows?
    thanks

Answers

  • Tuesday, November 20, 2007 3:27 AM
    Moderator
     
     Answered

    You can find out th eversion of the framework by looking at th eregistry. go to My Computer\HKEY_LOCAL_MACHINE\SOFTWARE|MICROSOFT\NET FRAMEWORK SETUP\NDP  and you will know the versions of Framework on your box.

     

    Thanks,

    Manisha.

     

  • Tuesday, November 20, 2007 6:22 AM
    Moderator
     
     Answered

    Rob has blogged this question:

    Method 1:

    1.) Under HKLM\SOFTWARE\Microsoft\.NETFramework\policy\ check to see if the version you want is installed (for example, look for the v1.1 folder and 4322 for the version number to detect the released version of V1.1)

    2.) Under HKLM\Software\Microsoft\.NETFramework\InstallRoot get the path where the Framework is installed. Create a directory string by concatenating the install root and the version under policy. E.g. "C:\WINDOWS\Microsoft.NET\Framework\" + "v1.1" + "." + "4322"

    3.) Look at the directory, if mscorlib.dll (or another critical .dll to the .NET framework is there) the runtime is installed.

     

    Method 2:

    There's a caveat to this method in that the shim gets left behind when we uninstall if there is more than one version of the CLR on the machine, but it still can be useful depending on what version you're looking for:

    LoadLibrary(“mscoree.dll“); - if this fails then there's no runtime installed

    GetProcAddress(“CorBindToRuntime“); - if this fails there's no runtime installed

    CorBindToRuntime(“GetRequestedRuntimeInfo“);

    GetRequestedRuntimeInfo(xxxx); where xxxx is the build number.

     

    From: http://blogs.msdn.com/robvi/archive/2004/02/17/75272.aspx

     

    Thanks

All Replies

  • Monday, November 19, 2007 10:18 PM
     
     

    You can check "Add or Remove Programs" from Control Panel, if you have .Net Framework installed you should see entries for each version you have there.

     

    Thanks,

    Veronica

  • Monday, November 19, 2007 10:27 PM
     
     

    Thanks,

    i think this solution not always work. if i installed .net frame work alone windows doesnt put it on contorl panel program list.

    is there is a command exucted from the command prompt or something like this help me to know .net version??

  • Tuesday, November 20, 2007 3:27 AM
    Moderator
     
     Answered

    You can find out th eversion of the framework by looking at th eregistry. go to My Computer\HKEY_LOCAL_MACHINE\SOFTWARE|MICROSOFT\NET FRAMEWORK SETUP\NDP  and you will know the versions of Framework on your box.

     

    Thanks,

    Manisha.

     

  • Tuesday, November 20, 2007 6:22 AM
    Moderator
     
     Answered

    Rob has blogged this question:

    Method 1:

    1.) Under HKLM\SOFTWARE\Microsoft\.NETFramework\policy\ check to see if the version you want is installed (for example, look for the v1.1 folder and 4322 for the version number to detect the released version of V1.1)

    2.) Under HKLM\Software\Microsoft\.NETFramework\InstallRoot get the path where the Framework is installed. Create a directory string by concatenating the install root and the version under policy. E.g. "C:\WINDOWS\Microsoft.NET\Framework\" + "v1.1" + "." + "4322"

    3.) Look at the directory, if mscorlib.dll (or another critical .dll to the .NET framework is there) the runtime is installed.

     

    Method 2:

    There's a caveat to this method in that the shim gets left behind when we uninstall if there is more than one version of the CLR on the machine, but it still can be useful depending on what version you're looking for:

    LoadLibrary(“mscoree.dll“); - if this fails then there's no runtime installed

    GetProcAddress(“CorBindToRuntime“); - if this fails there's no runtime installed

    CorBindToRuntime(“GetRequestedRuntimeInfo“);

    GetRequestedRuntimeInfo(xxxx); where xxxx is the build number.

     

    From: http://blogs.msdn.com/robvi/archive/2004/02/17/75272.aspx

     

    Thanks

  • Tuesday, November 20, 2007 6:39 AM
    Moderator
     
     

    The methods I mentioned above is the right way to detect the version of .NET Framework CLR.

    You know, even you install .NET Framework 3.0 or 3.5, the CLR version is still 2.0.

    And looking into the registry is the common way to see what have been installed so far on one machine.

    Otherwise, you may also find other tricks like using clrver.exe command within .NET Framework SDK to see the CLR version.

    Thanks

  • Friday, February 06, 2009 4:31 AM
     
     
     Where is CLRVer.exe located in the file system?