VB.NET 2005 Version Number in Application

Z

Zim Babwe

I posted in another group but thought this was the better place to post,
since it had to do with the vb language

I have been making changes to my Windows Application and in the
Project/Properties the Publish Version shows the following:

Major: 1
Minor: 0
Build: 0
Revision: 45

I would like to show this information in the "About Screen" and I have:
My.Application.Info.Version
but this shows
Build: 0
Major: 1
MajorRevision: 0
Minor: 0
MinorRevision: 0
Revision: 0

(this was taken at a break point and displayed in the Immediate Window)

How can I display in my application the information regarding the correct
Major, Minor, Build, and Revision?

Thanks in advance
 
P

Patrick Steele

I posted in another group but thought this was the better place to post,
since it had to do with the vb language

I have been making changes to my Windows Application and in the
Project/Properties the Publish Version shows the following:

Major: 1
Minor: 0
Build: 0
Revision: 45

I would like to show this information in the "About Screen" and I have:
My.Application.Info.Version
but this shows
Build: 0
Major: 1
MajorRevision: 0
Minor: 0
MinorRevision: 0
Revision: 0

The "Publishing" tab is only if you're doing ClickOnce deployment. The
My.Application.Info.Version displays the assembly version which can be
found on the "Application" tab when you click on "Assembly
Information..."
 
M

mark_vogt

The "Publishing" tab is only if you're doing ClickOnce deployment. The
My.Application.Info.Version displays the assembly version which can be
found on the "Application" tab when you click on "Assembly
Information..."


Patrick - thanks for the clarification. As a VS.NET2005 newbie, I was
not aware (I wonder how many people are) that there is a distinction
between "ClickOnce Revisions" and what I can only call "Standard
Revisions".

For those of us who LIKE the auto-incrementing of Revisions, and DO
use the ClickOnce deployment, can you recommend how to get the auto-
incremented ("ClickOnce") revision to display in our SplashScreen and
About forms?

The only examples of code exist in the Splashscreen class itself, and
(apparently) assume that one is NOT using the ClickOnce feature,
because all the sample code utilizes the
My.Application.Info.Version.Revision references - which apparently are
NOT the same as what appears in the Publish Tab of the My Project item
in my solution. Any references/resources you can suggest for
understanding this better would be most welcome.

Lastly, can you offer any best practices if one wants to somehow
synchronize (or otherwise reconcile) these 2 distincts "revisions"? It
drives me crazy to realize that VS.NET2005 is somehow tracking 2
different KINDS of "revisions" - only because I chose one deployment
strategy over another.

TIA,
- Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top