473,396 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 14524
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alain Tesio | last post by:
Hi, I can't manage to get the major or minor device numbers with os.stat : ~ $ll /dev/xda7 /dev/xda8 brw-rw---- 1 root disk 13, 7 Nov 30 2000 /dev/xda7 brw-rw---- 1 root ...
1
by: John Doe | last post by:
Does anyone understand what a 'raw device number' is with respect os.major() and os.minor() Found in os-file-dir.html, section 6.1.4, os.major() description is: major(device) Extracts a...
0
by: Oliver Elphick | last post by:
The attached proposal is written primarily for Debian. Its motivation is that the current package upgrade process is pretty flaky and also that the current packaging does not really provide for...
27
by: Daniel Vallstrom | last post by:
I'm having problems with inconsistent floating point behavior resulting in e.g. assert( x > 0.0 && putchar('\n') && x == 0.0 ); holding. (Actually, my problem is the dual one where I get...
6
by: W1ld0ne [MCSD] | last post by:
In vb 6 objects you could build a .Version method that returned the version of your object using the App.Major & "." & app.Minor & "." & App.Revision method. How do you do this in .Net? ...
6
by: Frank V. | last post by:
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...
0
by: Fuzzyman | last post by:
It's finally happened, `Movable Python <http://www.voidspace.org.uk/python/movpy/>`_ is finally released. Versions for Python 2.3 & 2.4 are available from `The Movable Python Shop...
1
by: theWizard1 | last post by:
Using Asp.NET 2.0. I published my web application to the server using the publish to website feature of asp.net 2.0. In VS.Net 2005 IDE, on solution explorer, at top level just below solution, I...
2
by: Birky | last post by:
Can someone point me in the right direction on how to use Version Numbers within Access? I have a database were its primary goal is to track the versions of several projects. Since the version...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.