|
-
Mar 29th, 2007, 10:56 AM
#1
Thread Starter
Lively Member
[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?
-
Mar 29th, 2007, 11:03 AM
#2
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)
-
Mar 29th, 2007, 11:36 AM
#3
Thread Starter
Lively Member
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.
-
Mar 29th, 2007, 11:43 AM
#4
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)
-
Mar 29th, 2007, 11:43 AM
#5
Thread Starter
Lively Member
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
-
Mar 29th, 2007, 11:49 AM
#6
Thread Starter
Lively Member
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.
-
Mar 29th, 2007, 11:51 AM
#7
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
-
Mar 29th, 2007, 11:52 AM
#8
Thread Starter
Lively Member
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...?
-
Mar 29th, 2007, 12:04 PM
#9
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|