getting application version...

S

Support

My vb.net 2.0 application has a publish version of major = 1, Minor =0,
Build = 2 and Revision = 11
with Automatically increment selected.

How do I programatically extract that information.
Thanks
Terry
 
B

BK

Dim FVI As FileVersionInfo
FVI = FileVersionInfo.GetVersionInfo("<Filename and path here>")
FVI.FileMajorPart()
FVI.FileMinorPart()
FVI.FileBuildPart()
...... etc.

HTH
 
S

Support

It does not:
In my Publish tab: I have the values: 1.0.2.13 (Major.Minor.Build.Revision)
With your code I get : 1.0.0 and there are no revision properties...
any other suggestions ?
T
 
J

Jason

msgbox(My.Application.Info.Version.ToString)

:)

Support said:
It does not:
In my Publish tab: I have the values: 1.0.2.13
(Major.Minor.Build.Revision)
With your code I get : 1.0.0 and there are no revision properties...
any other suggestions ?
T
 
B

BK

Sorry, I'm not sure what else to do. Try Jason's suggestion. I use VS
2003 and the code I passed on works. Our shop hasn't moved to VS 2005
yet, but one of my programmers is working with it and he told me he was
having problems with auto incrementing the build numbers.
Unfortunately, we have a large application that relies on this to push
changes to the users without any work on our part. I'd be anxious to
hear your results or any solution you come up with.
 
J

Jason

ahhh... actually my.application.info.version shows the build
version....not the publish version (which only gets incremented each time
the app is published if the box is checked....) the build version will
increment on each build
 

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