VB.NET application Version

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

    #1

    VB.NET application Version

    I have a VB.NET application that is deployed to an end user. I would like to
    display on screen the application version of the application so that I know
    the end user id using the latest version of our software.

    How do you access the property of the application version?
  • Michael

    #2
    RE: VB.NET application Version


    With the assumption that this is a Windows Form application.... Take a look
    at System.Windows. Forms.Applicati on.ProductVersi on.

    Michael

    "Lyners" wrote:
    I have a VB.NET application that is deployed to an end user. I would like to
    display on screen the application version of the application so that I know
    the end user id using the latest version of our software.
    >
    How do you access the property of the application version?

    Comment

    • Lyners

      #3
      RE: VB.NET application Version

      No, I don't think that is what I am looking for. What I wanted was the
      Version that a developer can set when a setup package is created (i.e. 1.0.0
      or 1.0.1). These version numbers seem to be some kind of internal version
      number by file.

      "Michael" wrote:
      >
      With the assumption that this is a Windows Form application.... Take a look
      at System.Windows. Forms.Applicati on.ProductVersi on.
      >
      Michael
      >
      "Lyners" wrote:
      >
      I have a VB.NET application that is deployed to an end user. I would like to
      display on screen the application version of the application so that I know
      the end user id using the latest version of our software.

      How do you access the property of the application version?

      Comment

      • Miro

        #4
        Re: VB.NET application Version

        Im in VB2003

        try this

        Function VersionNumber() As String
        Dim VersionNo As System.Version =
        System.Reflecti on.Assembly.Get ExecutingAssemb ly().GetName(). Version

        Return VersionNo.Major .ToString & "." & _
        VersionNo.Minor .ToString & "." & _
        VersionNo.Build .ToString & "." & _
        VersionNo.Revis ion.ToString
        End Function


        ' if you double click on the code of the AssemlbyInfo.vb you should see a
        line on the bottom that looks similar to this;
        <Assembly: AssemblyVersion ("1.00.0.0") >

        Is that the version you are looking for?

        Miro


        "Lyners" <Lyners@discuss ions.microsoft. comwrote in message
        news:AF29A93C-0A50-4258-AF8E-922C59565970@mi crosoft.com...
        No, I don't think that is what I am looking for. What I wanted was the
        Version that a developer can set when a setup package is created (i.e.
        1.0.0
        or 1.0.1). These version numbers seem to be some kind of internal version
        number by file.
        >
        "Michael" wrote:
        >
        >>
        >With the assumption that this is a Windows Form application.... Take a
        >look
        >at System.Windows. Forms.Applicati on.ProductVersi on.
        >>
        >Michael
        >>
        >"Lyners" wrote:
        >>
        I have a VB.NET application that is deployed to an end user. I would
        like to
        display on screen the application version of the application so that I
        know
        the end user id using the latest version of our software.
        >
        How do you access the property of the application version?

        Comment

        • Lyners

          #5
          Re: VB.NET application Version

          Now I think I understand. For displaying a version number, a developer would
          use the Assembly.vb to increment the version number. I was trying to use the
          setup version number, but I believe that is unaccessable during execution
          because that version umber is only used on installs. Correct?

          I have it working now, once I updated the assembly.vb.

          "Miro" wrote:
          Im in VB2003
          >
          try this
          >
          Function VersionNumber() As String
          Dim VersionNo As System.Version =
          System.Reflecti on.Assembly.Get ExecutingAssemb ly().GetName(). Version
          >
          Return VersionNo.Major .ToString & "." & _
          VersionNo.Minor .ToString & "." & _
          VersionNo.Build .ToString & "." & _
          VersionNo.Revis ion.ToString
          End Function
          >
          >
          ' if you double click on the code of the AssemlbyInfo.vb you should see a
          line on the bottom that looks similar to this;
          <Assembly: AssemblyVersion ("1.00.0.0") >
          >
          Is that the version you are looking for?
          >
          Miro
          >
          >
          "Lyners" <Lyners@discuss ions.microsoft. comwrote in message
          news:AF29A93C-0A50-4258-AF8E-922C59565970@mi crosoft.com...
          No, I don't think that is what I am looking for. What I wanted was the
          Version that a developer can set when a setup package is created (i.e.
          1.0.0
          or 1.0.1). These version numbers seem to be some kind of internal version
          number by file.

          "Michael" wrote:
          >
          With the assumption that this is a Windows Form application.... Take a
          look
          at System.Windows. Forms.Applicati on.ProductVersi on.
          >
          Michael
          >
          "Lyners" wrote:
          >
          I have a VB.NET application that is deployed to an end user. I would
          like to
          display on screen the application version of the application so that I
          know
          the end user id using the latest version of our software.

          How do you access the property of the application version?
          >
          >
          >

          Comment

          • Michael

            #6
            Re: VB.NET application Version


            Sorry that my first crack at it didn't give you the information that you
            were looking for. :) There are a couple of things that you should keep in
            mind.

            Version of Assembly: <Assembly: AssemblyVersion ("1.00.0.0") >
            Version of Product: <Assembly: AssemblyInforma tionalVersion(" 1.0")>
            File Version (of DLL): <Assembly: AssemblyFileVer sion("1.0.*")>

            The ProductVersion that I showed returns the AssemblyInforma tionalVersion
            string. By default AssemblyInforma tionVersion and AssemblyFileVer sion are
            not included in the AssemblyInfo file and they default to the value of
            AssemblyVersion so it would have returned the same value. You can read more
            about them in the MSDN help, but Miro's answer will work for you to! :)

            Michael

            "Lyners" wrote:
            Now I think I understand. For displaying a version number, a developer would
            use the Assembly.vb to increment the version number. I was trying to use the
            setup version number, but I believe that is unaccessable during execution
            because that version umber is only used on installs. Correct?
            >
            I have it working now, once I updated the assembly.vb.
            >
            "Miro" wrote:
            >
            Im in VB2003

            try this

            Function VersionNumber() As String
            Dim VersionNo As System.Version =
            System.Reflecti on.Assembly.Get ExecutingAssemb ly().GetName(). Version

            Return VersionNo.Major .ToString & "." & _
            VersionNo.Minor .ToString & "." & _
            VersionNo.Build .ToString & "." & _
            VersionNo.Revis ion.ToString
            End Function


            ' if you double click on the code of the AssemlbyInfo.vb you should see a
            line on the bottom that looks similar to this;
            <Assembly: AssemblyVersion ("1.00.0.0") >

            Is that the version you are looking for?

            Miro


            "Lyners" <Lyners@discuss ions.microsoft. comwrote in message
            news:AF29A93C-0A50-4258-AF8E-922C59565970@mi crosoft.com...
            No, I don't think that is what I am looking for. What I wanted was the
            Version that a developer can set when a setup package is created (i.e.
            1.0.0
            or 1.0.1). These version numbers seem to be some kind of internal version
            number by file.
            >
            "Michael" wrote:
            >
            >>
            >With the assumption that this is a Windows Form application.... Take a
            >look
            >at System.Windows. Forms.Applicati on.ProductVersi on.
            >>
            >Michael
            >>
            >"Lyners" wrote:
            >>
            I have a VB.NET application that is deployed to an end user. I would
            like to
            display on screen the application version of the application so that I
            know
            the end user id using the latest version of our software.
            >
            How do you access the property of the application version?

            Comment

            Working...