[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?
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:
System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
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.
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:
Dim strVersion as String = "Version {0}.{1:00}"
System.String.Format(strVersion, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
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
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.
Re: Application Version Displaying Incorrectly.
oh damn it..my apologies yet again. I missed some code:(
VB Code:
Dim strVersion As String = "Version {0}.{1:00}"
strVersion = System.String.Format(strVersion, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
Label4.Text = strVersion
..thats what happens when you try to do too much at once:(
Re: Application Version Displaying Incorrectly.
lol :D
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...?
Re: Application Version Displaying Incorrectly.
Resolved.. this isssue was a chair to keyboard interface issue!...:blush:
Under project propertys application tab/ Assembly information button... bingo..
Assembly version and File verson input fields.... DOH!..