473,473 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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
Nov 20 '05 #1
6 2929
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
Nov 20 '05 #2
* ja*******@yahoo.com (Frank V.) scripsit:
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!


Basic information on versioning:

<URL:http://msdn.microsoft.com/library/en-us/dndotnet/html/managevers.asp>
<URL:http://msdn.microsoft.com/library/en-us/dnbda/html/tdlg_ch5.asp>
<URL:http://msdn.microsoft.com/library/en-us/cptutorials/html/versioning_components.asp>

Parts of the version number:

Main version
"Product" version.

Sub version
Sub version, for example Service Pack.

Build
During development, auto-increment.

Revision
Hotfix or Quick Fix Engineering (QFE).

When using auto incrementation of numbers, the build number contains the
number of days since January, 2000; the revision contains the number of
seconds since midnight divided by 2.

The version number can be changed in the file "AssemblyInfo.vb". The
version number will updated automatically when re-opening the solution.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #3


Ken, Thank you. I've never noticed that before. But, that gives me the
exact same thing as the code

System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Version.ToString

Although, much shorter (coding wise), that still don't really answer my
question.

I've searched many web sites, and found nothing doing versioning in VB.
Thanks!

-Frank Villasenor

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #4

The version number can be changed in the file "AssemblyInfo.vb". The
version number will updated automatically when re-opening the solution

Ok, so the version number isn't undated everything that you compile the
program (like in Visual C++)?

Thank you very much for your response. The information that you gave me
we quite helpful.

-Frank villasenor

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #5
"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.
Nov 20 '05 #6
Phill W.

Thanks a lot for the information. I highly appricated that you took
the time to respond to that.

Frank V.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
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...
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? ...
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...
5
by: Frankie | last post by:
I understand that .NET Framework 3.5 is currently in Beta-2, with initial TRM expected sometime near the end of this year, with the big-time launch in February. Question: Are there major changes...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.