How: Programatically Determine .NET Framework version

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ken Stealth

    #1

    How: Programatically Determine .NET Framework version

    Hi,

    Is there a way to obtain the version of .net that my application is
    riding on (on the server). My app isn't tested nor does it run 100%
    on V1.1 and for some reason my service provided has upgraded me twice.
    I'd like my software to be proactive and tell me about it next time
    they do it.

    Is there an object that exposes the framework's version?

    Thanks
  • Ken Cox [Microsoft MVP]

    #2
    Re: Programatically Determine .NET Framework version

    Also, check out Environment.Ver sion:

    Response.Write( Environment.Ver sion.ToString)

    --
    Microsoft MVPs have a question for *you*: Are you patched against the Worm?
    http://www.microsoft.com/security/se...s/ms03-026.asp



    "Ken Stealth" <kenls1957@yaho o.com> wrote in message
    news:6391d478.0 308241002.4f2e5 245@posting.goo gle.com...
    Hi,

    Is there a way to obtain the version of .net that my application is
    riding on (on the server). My app isn't tested nor does it run 100%
    on V1.1 and for some reason my service provided has upgraded me twice.
    I'd like my software to be proactive and tell me about it next time
    they do it.

    Is there an object that exposes the framework's version?

    Thanks


    Comment

    • MS News \(MS ILM\)

      #3
      Re: Programatically Determine .NET Framework version

      Very good,

      It looks like the Location indicates the ver of the FrameWork?
      Is there anything else that will tell you Your Version Number is 1.1?

      Thanks


      "Ken Cox [Microsoft MVP]" <BANSPAMken_cox @sympatico.ca> wrote in message
      news:OkAkH1maDH A.1580@tk2msftn gp13.phx.gbl...[color=blue]
      > This will tell you what assemblies and versions your app is using. Is that[/color]
      what[color=blue]
      > you meant?
      >
      > Ken
      >
      > Private Sub Page_Load(ByVal sender As System.Object, _
      > ByVal e As System.EventArg s) Handles MyBase.Load
      > If Not IsPostBack Then
      > Dim thisAssembly As [Assembly] = [Assembly].GetExecutingAs sembly()
      > Dim RefAssembly As AssemblyName
      > Response.Write( "Referenced Assemblies: " & "<br>")
      > For Each RefAssembly In thisAssembly.Ge tReferencedAsse mblies()
      > Response.Write( RefAssembly.Ful lName & "<br>")
      > Next
      > Response.Write( "Code base: " & thisAssembly.Co deBase & "<br>")
      > Response.Write( "Full name: " & thisAssembly.Fu llName & "<br>")
      > Response.Write( "From Global Assembly Cache: " &
      > thisAssembly.Gl obalAssemblyCac he & "<br>")
      > Response.Write( "Location: " & thisAssembly.Lo cation & "<br>")
      > End If
      > End Sub
      >
      >
      > --
      > Microsoft MVPs have a question for *you*: Are you patched against the[/color]
      Worm?[color=blue]
      > http://www.microsoft.com/security/se...s/ms03-026.asp
      >
      >
      >
      > "Ken Stealth" <kenls1957@yaho o.com> wrote in message
      > news:6391d478.0 308241002.4f2e5 245@posting.goo gle.com...
      > Hi,
      >
      > Is there a way to obtain the version of .net that my application is
      > riding on (on the server). My app isn't tested nor does it run 100%
      > on V1.1 and for some reason my service provided has upgraded me twice.
      > I'd like my software to be proactive and tell me about it next time
      > they do it.
      >
      > Is there an object that exposes the framework's version?
      >
      > Thanks
      >
      >[/color]


      Comment

      • MS News \(MS ILM\)

        #4
        Re: Programatically Determine .NET Framework version

        That is good
        Thank you
        "Ken Cox [Microsoft MVP]" <BANSPAMken_cox @sympatico.ca> wrote in message
        news:es%23ZX3ma DHA.2336@TK2MSF TNGP09.phx.gbl. ..[color=blue]
        > Also, check out Environment.Ver sion:
        >
        > Response.Write( Environment.Ver sion.ToString)
        >
        > --
        > Microsoft MVPs have a question for *you*: Are you patched against the[/color]
        Worm?[color=blue]
        > http://www.microsoft.com/security/se...s/ms03-026.asp
        >
        >
        >
        > "Ken Stealth" <kenls1957@yaho o.com> wrote in message
        > news:6391d478.0 308241002.4f2e5 245@posting.goo gle.com...
        > Hi,
        >
        > Is there a way to obtain the version of .net that my application is
        > riding on (on the server). My app isn't tested nor does it run 100%
        > on V1.1 and for some reason my service provided has upgraded me twice.
        > I'd like my software to be proactive and tell me about it next time
        > they do it.
        >
        > Is there an object that exposes the framework's version?
        >
        > Thanks
        >
        >[/color]


        Comment

        Working...