none
How to find version of the installed dot net framework version RRS feed

  • Question

  • How to find version of the installed dot net framework version programitically by vb.net.

    I have many version in my system 1.1,2.0,3.0,3.5. But how cani find that framework 3.5 installed or not.


    Saturday, November 21, 2009 1:55 PM

Answers

All replies

  • hi PdNet,
    open your control panel and open add/remove programs and try to find
    ".net frame work 3.5" if you didn't find it then you didn't have the framewrk 3.5
    in otherwise  run the setup of framework 3.5 if you see the first page is add or remove the program
    then you have the framework 3.5 else you don't have the framework 3.5.

    --------
    mohamed elghamry
    --------

    Sunday, November 22, 2009 7:51 PM
  • Hello This is totally out of logic,  I want it programitically
    Monday, November 23, 2009 4:33 AM
  • hi,
    take this code:
    If My.Computer.FileSystem.FileExists("C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\vbc.exe") = True Then
                'write here the code when the program found the frame work v1.0
            Else
                'write here the code when the program didn't find the frame work v1.0
            End If
            If My.Computer.FileSystem.FileExists("C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.exe") = True Then
                'write here the code when the program found the frame work v1.1
            Else
                'write here the code when the program didn't find the frame work v1.1
            End If
            If My.Computer.FileSystem.FileExists("C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vbc.exe") = True Then
                'write here the code when the program found the frame work v2.0
            Else
                'write here the code when the program didn't find the frame work v2.0
            End If
            If My.Computer.FileSystem.FileExists("C:\WINDOWS\Microsoft.NET\Framework\v3.0\vbc.exe") = True Then
                'write here the code when the program found the frame work v3.0
            Else
                'write here the code when the program didn't find the frame work v3.0
            End If
            If My.Computer.FileSystem.FileExists("C:\WINDOWS\Microsoft.NET\Framework\v3.5\vbc.exe") = True Then
                'write here the code when the program found the frame work v3.5
            Else
                'write here the code when the program didn't find the frame work v3.5
            End If
    
    

    -----------------------
    don't forget mark this post as answer if this post help you
    mohamed elghamry
    -----------------------
    Monday, November 23, 2009 8:32 AM
  • Hi PdNet,

    Thank you for your post.

    For your concern, to detect what .NET Framework versions and service packs are installed, here is a helpful sample code:
    http://www.codeproject.com/KB/dotnet/frameworkversiondetection.aspx

    BTW, this forum is for the support of .NET Framework installation.
    For programming issue, I think that the best consulting place should the following forums:
    For VB.NET -  Visual Basic General forum
    For C# - Visual C# General forum
    For C++ - Visual C++ General forum
    For more forums, see: http://social.msdn.microsoft.com/Forums/en-us/categories/

    This will make answer searching in the forum easier and be beneficial to other community members as well.

    Hope this helps!

    Best regards,
    Yichun Chen 

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by YiChun Chen Friday, November 27, 2009 3:38 AM
    Monday, November 23, 2009 11:34 AM