Publish Version number

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • barrysmith1966@hotmail.com

    #1

    Publish Version number

    Hello,

    I am using VS2005 and the publish feature.

    Is there any way I get the version number from within my application?
    i.e. I have a splash screen and would like to display the latest
    version number.

    Ta in advance
    Barry

  • sweet_dreams

    #2
    Re: Publish Version number


    barrysmith1966@ hotmail.com napisal(a):
    Hello,
    >
    I am using VS2005 and the publish feature.
    >
    Is there any way I get the version number from within my application?
    i.e. I have a splash screen and would like to display the latest
    version number.
    >
    Ta in advance
    Barry
    Hi
    If you would like to get your application version use this code:

    My.Application. Info.Version

    Hope this helps.

    Regards,
    sweet_dreams

    Comment

    • sweet_dreams

      #3
      Re: Publish Version number

      by the way here is good article about My namespace:


      it's really worth reading

      sweet_dreams

      Comment

      • Bazza

        #4
        Re: Publish Version number


        sweet_dreams wrote:
        Hi
        If you would like to get your application version use this code:
        >
        My.Application. Info.Version
        >
        Hope this helps.
        >
        Regards,
        sweet_dreams
        Thanks but I did try this before but it returns a version number of
        1.0.2133.26735 (version of the .exe file installed) whereas I published
        the application using version 3.0.1.x

        What I am trying to get is the 3.0.1.x version number returned.

        Thanks in advance
        Barry

        Comment

        • AMP

          #5
          Re: Publish Version number


          barrysmith1966@ hotmail.com wrote:
          Hello,
          >
          I am using VS2005 and the publish feature.
          >
          Is there any way I get the version number from within my application?
          i.e. I have a splash screen and would like to display the latest
          version number.
          >
          Ta in advance
          Barry

          Try
          pvversion = "Publish Version: " &
          My.Application. Deployment.Curr entVersion.ToSt ring

          Comment

          • Bazza

            #6
            Re: Publish Version number


            AMP wrote:
            barrysmith1966@ hotmail.com wrote:
            Hello,

            I am using VS2005 and the publish feature.

            Is there any way I get the version number from within my application?
            i.e. I have a splash screen and would like to display the latest
            version number.

            Ta in advance
            Barry
            >
            >
            Try
            pvversion = "Publish Version: " &
            My.Application. Deployment.Curr entVersion.ToSt ring
            Thats the job! Thanks very much.

            For anyone else reading this you will also need to take into account
            the following.

            Will fall over during running debug mode so use the following to get
            round this.

            If System.Diagnost ics.Debugger.Is Attached = False Then
            lb_version.Text = "Version : " &
            My.Application. Deployment.Curr entVersion.ToSt ring
            Else
            lb_version.Text = "Debug Mode"
            End If


            Cheers
            Barry

            Comment

            Working...