Results 1 to 9 of 9

Thread: [RESOLVED] Application Version Displaying Incorrectly.

  1. #1

    Thread Starter
    Lively Member smilbuta's Avatar
    Join Date
    Apr 2005
    Location
    Orlando
    Posts
    104

    Resolved [RESOLVED] Application Version Displaying Incorrectly.

    Hello Community..

    I am trying to display the version of my application programaticaly rather than just typing in a label.

    I have inserted this code to my form.
    Code:
    Label4.Text = My.Application.Info.Version.ToString()

    In my application my Version is 1.0.2 , it is the Property "version" in my Setup project. The format for this according to VB is ##.##.####

    My Label displays 1.0.0.0 when i execute .. what am i missing?

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Application Version Displaying Incorrectly.

    The premade splashscreen template uses this code to show the version, try it and see if it makes any difference.
    VB Code:
    1. System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3

    Thread Starter
    Lively Member smilbuta's Avatar
    Join Date
    Apr 2005
    Location
    Orlando
    Posts
    104

    Re: Application Version Displaying Incorrectly.

    Hello thanx , i get an underline error saying Version.text is not a member of System.version??

    Im using Visual Basic .Net. 2005, and this is a console application im working in.

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Application Version Displaying Incorrectly.

    Ah yes sorry, forgot that one. Version is just a label, with the text "Version {0}.{1:00}"

    VB Code:
    1. Dim strVersion as String = "Version {0}.{1:00}"
    2. System.String.Format(strVersion, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  5. #5

    Thread Starter
    Lively Member smilbuta's Avatar
    Join Date
    Apr 2005
    Location
    Orlando
    Posts
    104

    Re: Application Version Displaying Incorrectly.

    NEgative. i tried a ad hoc way to see what it was pulling..

    VersionString = (My.Application.Info.Version.Major)
    VersionString2 = (My.Application.Info.Version.Minor)... Ect Revision and Build statments..

    and the resulting values were as before: 1,0,0,0

  6. #6

    Thread Starter
    Lively Member smilbuta's Avatar
    Join Date
    Apr 2005
    Location
    Orlando
    Posts
    104

    Re: Application Version Displaying Incorrectly.

    Ok my appologies for not understanding fully why im having this issue
    ,this is how i enterd the code... it executed but the result was unexpected.

    Code:
            Dim strVersion As String = "Version {0}.{1:00}"
            System.String.Format(strVersion, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
            Label4.Text = strVersion
    on my form the result was : Version {0}.{1:00}.

    AM i looking in the wrong area for my version number???

    As i said im lokking at my setup project propertys under the version number where only 3 digits are shown. X.X.X

    yet under the main project propertys there is a version spot that has 4 distinct fields for major, minor, revision and build.
    Last edited by smilbuta; Mar 29th, 2007 at 11:52 AM.

  7. #7
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Application Version Displaying Incorrectly.

    oh damn it..my apologies yet again. I missed some code

    VB Code:
    1. Dim strVersion As String = "Version {0}.{1:00}"
    2.         strVersion = System.String.Format(strVersion, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
    3.         Label4.Text = strVersion

    ..thats what happens when you try to do too much at once
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  8. #8

    Thread Starter
    Lively Member smilbuta's Avatar
    Join Date
    Apr 2005
    Location
    Orlando
    Posts
    104

    Re: Application Version Displaying Incorrectly.

    lol

    Ok it works but the version it pulls is not what I have entered.

    It Displays. 1.00 as it should, but my version number is 1.0.2...

    I have a sneaky suspicion im not looking in the right spot to set my version.

    Where does one make changes to their Version number in projects...?

  9. #9

    Thread Starter
    Lively Member smilbuta's Avatar
    Join Date
    Apr 2005
    Location
    Orlando
    Posts
    104

    Re: Application Version Displaying Incorrectly.

    Resolved.. this isssue was a chair to keyboard interface issue!...

    Under project propertys application tab/ Assembly information button... bingo..

    Assembly version and File verson input fields.... DOH!..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width