Home All Groups Group Topic Archive Search About

getting application version...

Author
12 Apr 2006 5:34 PM
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

Author
12 Apr 2006 6:00 PM
Jason
my.Application.Info.Version.ToString  should give you what you want...



Show quoteHide quote
"Support" <RemoveThis_Supp***@mail.oci.state.ga.us> wrote in message
news:ubsyRdlXGHA.3532@TK2MSFTNGP05.phx.gbl...
> 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
>
Author
12 Apr 2006 6:01 PM
BK
Dim FVI As FileVersionInfo
FVI = FileVersionInfo.GetVersionInfo("<Filename and path here>")
FVI.FileMajorPart()
FVI.FileMinorPart()
FVI.FileBuildPart()
...... etc.

HTH
Author
12 Apr 2006 7:07 PM
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
Show quoteHide quote
"BK" <bkunn***@hotmail.com> wrote in message
news:1144864896.920406.280040@z34g2000cwc.googlegroups.com...
> Dim FVI As FileVersionInfo
> FVI = FileVersionInfo.GetVersionInfo("<Filename and path here>")
> FVI.FileMajorPart()
> FVI.FileMinorPart()
> FVI.FileBuildPart()
> ..... etc.
>
> HTH
>
Author
12 Apr 2006 7:10 PM
Jason
msgbox(My.Application.Info.Version.ToString)

Show quoteHide quote
:)

"Support" <RemoveThis_Supp***@mail.oci.state.ga.us> wrote in message
news:OfDHIRmXGHA.3496@TK2MSFTNGP05.phx.gbl...
> 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
> "BK" <bkunn***@hotmail.com> wrote in message
> news:1144864896.920406.280040@z34g2000cwc.googlegroups.com...
>> Dim FVI As FileVersionInfo
>> FVI = FileVersionInfo.GetVersionInfo("<Filename and path here>")
>> FVI.FileMajorPart()
>> FVI.FileMinorPart()
>> FVI.FileBuildPart()
>> ..... etc.
>>
>> HTH
>>
>
>
Author
12 Apr 2006 7:23 PM
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.
Author
12 Apr 2006 7:42 PM
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



Show quoteHide quote
"BK" <bkunn***@hotmail.com> wrote in message
news:1144869817.179814.281160@i39g2000cwa.googlegroups.com...
> 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.
>