472,111 Members | 2,049 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,111 software developers and data experts.

App.Major & App.Minor & [...] VB.Net Equivilant

Hello,
I'm new to VB.net, moving from VB6 to VB.net. My question is "In
VB.net what is the equivalent of the App.major (and others) VB6
property. I, like a lot of people I imaging, display the current
version number on my about form. Though I've used some code, I can't
get a version number that seems to update properly. I've read some
other posts that have mentioned 2 main things that I've learned.

1. <Assembly: AssemblyVersion("2.1.*")> <-- I can modify this, and
that will change my version of my Assembly. (I think that means the
final compiled file?) I can look at my EXE file properties and that
seems to be up to date.

2nd: System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Version.ToString
<-- I use that to get access to the version number that I set above.
(in this case, 2.1.*, and * being the build and revision that VB sets.

My concern and annoyance with this code that, it seems to only update
the revision and build code if i change my Assembly file.

So I guess in short, I'm looking for a version number that is for the
project globally.

Another question is what is the: System.Environment.Version.Major and
System.Environment.Version.Minor (and the rest) Are these form level
or what? and if so, is it possible to change them? Any input would be
appreciated, and I think you in advance!

-Frank Villasenor
Jul 17 '05 #1
3 14329
Hi,

Take a look at Application.ProductVersion()
Ken

------------------------

"Frank V." <ja*******@yahoo.com> wrote in message
news:76**************************@posting.google.c om...
Hello,
I'm new to VB.net, moving from VB6 to VB.net. My question is "In
VB.net what is the equivalent of the App.major (and others) VB6
property. I, like a lot of people I imaging, display the current
version number on my about form. Though I've used some code, I can't
get a version number that seems to update properly. I've read some
other posts that have mentioned 2 main things that I've learned.

1. <Assembly: AssemblyVersion("2.1.*")> <-- I can modify this, and
that will change my version of my Assembly. (I think that means the
final compiled file?) I can look at my EXE file properties and that
seems to be up to date.

2nd:
System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Version.ToString
<-- I use that to get access to the version number that I set above.
(in this case, 2.1.*, and * being the build and revision that VB sets.

My concern and annoyance with this code that, it seems to only update
the revision and build code if i change my Assembly file.

So I guess in short, I'm looking for a version number that is for the
project globally.

Another question is what is the: System.Environment.Version.Major and
System.Environment.Version.Minor (and the rest) Are these form level
or what? and if so, is it possible to change them? Any input would be
appreciated, and I think you in advance!

-Frank Villasenor
Jul 17 '05 #2
> I'm new to VB.net, moving from VB6 to VB.net.

For future reference, you can leave out these newsgroups

comp.lang.basic.visual.misc
comp.lang.visual.basic

from your future postings. The reason being...

Almost everybody in this newsgroup is using VB6 or lower. While you may
get a stray answer to VB.NET questions here, you should ask them in
newsgroups devoted exclusively to .NET programming. Look for newsgroups
with either the word "dotnet" or "vsnet" in their name.

For the microsoft news server, try these newsgroups...

microsoft.public.dotnet.general
microsoft.public.dotnet.languages.vb
microsoft.public.vsnet.general

There are some others, but these should get you started.

Rick - MVP

Jul 17 '05 #3
"Frank V." <ja*******@yahoo.com> wrote in message
news:76**************************@posting.google.c om...
(Apologies to VB "Proper" developers everywhere, but this is one
of my pet hates about Visual Fred!) . . .
1. <Assembly: AssemblyVersion("2.1.*")>
I can modify this, and that will change my version of my Assembly.
Get rid of the "*" (or "*.*")!
As you say , VB fills in the remander of the "version" for itself and
the numbers it uses make no sense whatever.
*Always* specify the version explicitly, as in

<Assembly: AssemblyVersion("2.1.0.0")>
My concern and annoyance with this code that, it seems to only
update the revision and build code if i change my Assembly file.
Correct. The /only/ way to change the "version" of your application
is to change the AssemblyInfo file.
So I guess in short, I'm looking for a version number that is for the
project globally.
You've already found it; for what it's worth.
what is the: System.Environment.Version.Major ... These are Framework classes/properties that give you the version
of the *Framework* - nothing to do with your application, specifically.
is it possible to change them?


Only by installing and using another version of the Framework ;-)

HTH,
Phill W.
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by John Doe | last post: by
27 posts views Thread by Daniel Vallstrom | last post: by
6 posts views Thread by W1ld0ne [MCSD] | last post: by
reply views Thread by Fuzzyman | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.