473,386 Members | 1,668 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,386 software developers and data experts.

VB.NET application Version

I have a VB.NET application that is deployed to an end user. I would like to
display on screen the application version of the application so that I know
the end user id using the latest version of our software.

How do you access the property of the application version?
Aug 23 '06 #1
5 15483

With the assumption that this is a Windows Form application....Take a look
at System.Windows.Forms.Application.ProductVersion.

Michael

"Lyners" wrote:
I have a VB.NET application that is deployed to an end user. I would like to
display on screen the application version of the application so that I know
the end user id using the latest version of our software.

How do you access the property of the application version?
Aug 23 '06 #2
No, I don't think that is what I am looking for. What I wanted was the
Version that a developer can set when a setup package is created (i.e. 1.0.0
or 1.0.1). These version numbers seem to be some kind of internal version
number by file.

"Michael" wrote:
>
With the assumption that this is a Windows Form application....Take a look
at System.Windows.Forms.Application.ProductVersion.

Michael

"Lyners" wrote:
I have a VB.NET application that is deployed to an end user. I would like to
display on screen the application version of the application so that I know
the end user id using the latest version of our software.

How do you access the property of the application version?
Aug 23 '06 #3
Im in VB2003

try this

Function VersionNumber() As String
Dim VersionNo As System.Version =
System.Reflection.Assembly.GetExecutingAssembly(). GetName().Version

Return VersionNo.Major.ToString & "." & _
VersionNo.Minor.ToString & "." & _
VersionNo.Build.ToString & "." & _
VersionNo.Revision.ToString
End Function
' if you double click on the code of the AssemlbyInfo.vb you should see a
line on the bottom that looks similar to this;
<Assembly: AssemblyVersion("1.00.0.0")>

Is that the version you are looking for?

Miro
"Lyners" <Ly****@discussions.microsoft.comwrote in message
news:AF**********************************@microsof t.com...
No, I don't think that is what I am looking for. What I wanted was the
Version that a developer can set when a setup package is created (i.e.
1.0.0
or 1.0.1). These version numbers seem to be some kind of internal version
number by file.

"Michael" wrote:
>>
With the assumption that this is a Windows Form application....Take a
look
at System.Windows.Forms.Application.ProductVersion.

Michael

"Lyners" wrote:
I have a VB.NET application that is deployed to an end user. I would
like to
display on screen the application version of the application so that I
know
the end user id using the latest version of our software.

How do you access the property of the application version?

Aug 23 '06 #4
Now I think I understand. For displaying a version number, a developer would
use the Assembly.vb to increment the version number. I was trying to use the
setup version number, but I believe that is unaccessable during execution
because that version umber is only used on installs. Correct?

I have it working now, once I updated the assembly.vb.

"Miro" wrote:
Im in VB2003

try this

Function VersionNumber() As String
Dim VersionNo As System.Version =
System.Reflection.Assembly.GetExecutingAssembly(). GetName().Version

Return VersionNo.Major.ToString & "." & _
VersionNo.Minor.ToString & "." & _
VersionNo.Build.ToString & "." & _
VersionNo.Revision.ToString
End Function
' if you double click on the code of the AssemlbyInfo.vb you should see a
line on the bottom that looks similar to this;
<Assembly: AssemblyVersion("1.00.0.0")>

Is that the version you are looking for?

Miro
"Lyners" <Ly****@discussions.microsoft.comwrote in message
news:AF**********************************@microsof t.com...
No, I don't think that is what I am looking for. What I wanted was the
Version that a developer can set when a setup package is created (i.e.
1.0.0
or 1.0.1). These version numbers seem to be some kind of internal version
number by file.

"Michael" wrote:
>
With the assumption that this is a Windows Form application....Take a
look
at System.Windows.Forms.Application.ProductVersion.

Michael

"Lyners" wrote:

I have a VB.NET application that is deployed to an end user. I would
like to
display on screen the application version of the application so that I
know
the end user id using the latest version of our software.

How do you access the property of the application version?


Aug 23 '06 #5

Sorry that my first crack at it didn't give you the information that you
were looking for. :) There are a couple of things that you should keep in
mind.

Version of Assembly: <Assembly: AssemblyVersion("1.00.0.0")>
Version of Product: <Assembly: AssemblyInformationalVersion("1.0")>
File Version (of DLL): <Assembly: AssemblyFileVersion("1.0.*")>

The ProductVersion that I showed returns the AssemblyInformationalVersion
string. By default AssemblyInformationVersion and AssemblyFileVersion are
not included in the AssemblyInfo file and they default to the value of
AssemblyVersion so it would have returned the same value. You can read more
about them in the MSDN help, but Miro's answer will work for you to! :)

Michael

"Lyners" wrote:
Now I think I understand. For displaying a version number, a developer would
use the Assembly.vb to increment the version number. I was trying to use the
setup version number, but I believe that is unaccessable during execution
because that version umber is only used on installs. Correct?

I have it working now, once I updated the assembly.vb.

"Miro" wrote:
Im in VB2003

try this

Function VersionNumber() As String
Dim VersionNo As System.Version =
System.Reflection.Assembly.GetExecutingAssembly(). GetName().Version

Return VersionNo.Major.ToString & "." & _
VersionNo.Minor.ToString & "." & _
VersionNo.Build.ToString & "." & _
VersionNo.Revision.ToString
End Function
' if you double click on the code of the AssemlbyInfo.vb you should see a
line on the bottom that looks similar to this;
<Assembly: AssemblyVersion("1.00.0.0")>

Is that the version you are looking for?

Miro
"Lyners" <Ly****@discussions.microsoft.comwrote in message
news:AF**********************************@microsof t.com...
No, I don't think that is what I am looking for. What I wanted was the
Version that a developer can set when a setup package is created (i.e.
1.0.0
or 1.0.1). These version numbers seem to be some kind of internal version
number by file.
>
"Michael" wrote:
>
>>
>With the assumption that this is a Windows Form application....Take a
>look
>at System.Windows.Forms.Application.ProductVersion.
>>
>Michael
>>
>"Lyners" wrote:
>>
I have a VB.NET application that is deployed to an end user. I would
like to
display on screen the application version of the application so that I
know
the end user id using the latest version of our software.
>
How do you access the property of the application version?
Aug 24 '06 #6

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

Similar topics

3
by: max | last post by:
Hi, How do I control the applcation version?? Change the Major, Minor, build and revision numbers? thanks, --max
5
by: Bob | last post by:
Application.Version provides the version of Access being used eg 10 for Access 2000. I use some code like: Set appAccess = CreateObject("Access.Application.8") in Access 97 to open a new...
2
by: PawelR | last post by:
Hello Group, I've question: How set number of version my apps? thx PawelR
3
by: Michael Kellogg | last post by:
At the beginning of program execution, I want to compare the executing version of the program against the network copy to see if there's been an update. In the "Properties" window of an EXE, I can...
12
by: joanne | last post by:
how to tell application version after i installed it at client side? i did make the version and product code while doing the packaging and deployment. Thanks a lot.
6
by: Support | last post by:
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....
1
by: Bipin Mistry | last post by:
hi all, Please reply as I am new to VC .Net GUI Can any one please tell me from where I can set Application version in VC .Net environment. Please note that I am creating Exe & DLL...
2
by: John | last post by:
Hi I am using the application version using Application.ProductVersion.ToString. The problem is that the version number returned is always 1.0.0. and never changes despite many changes and...
1
by: imageguy | last post by:
We are trying to implement a system that checks the version of the application against a version number stored in the database. We don't want the app and the db don't become out of sync. We...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...

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.