473,503 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Assign deployment version number to a variable

In my project, I want to display the version number on the splash screen and
in the help section of my application. I have a variable I created called
appVersion. When I go to my deployment project properties, the Version number
is there. Is there a line of code that I can use where I can assign the
version number to the appVersion variable, something like
"appVersion=system.deploymentapp.properties.versio n" but that actually works?

Many thanks,
--
Cary
Nov 21 '05 #1
2 3485

Assuming you are setting your version number in the AssemblyInfo.vb file,
this should do it:

s_VersionMajor =
System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Version.Major()
s_VersionMinor =
System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Version.Minor()
s_VersionBuild =
System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Version.Build()
s_VersionRevision =
System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Version.Revision()

"Cary" <Ca**@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
In my project, I want to display the version number on the splash screen
and
in the help section of my application. I have a variable I created called
appVersion. When I go to my deployment project properties, the Version
number
is there. Is there a line of code that I can use where I can assign the
version number to the appVersion variable, something like
"appVersion=system.deploymentapp.properties.versio n" but that actually
works?

Many thanks,
--
Cary

Nov 21 '05 #2
Actually, it turns out all this time I hadn't touched the AssemblyInfo.vb
file. I've been putting information like the version umber, manufacturer,
product name, etc. in the Deployment Project Properties (where the
ProductCode and UpgradeCode properties are located).

Do you know how to access the Version number on the Deployment Project
Properties?

"Robin Tucker" wrote:

Assuming you are setting your version number in the AssemblyInfo.vb file,
this should do it:

s_VersionMajor =
System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Version.Major()
s_VersionMinor =
System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Version.Minor()
s_VersionBuild =
System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Version.Build()
s_VersionRevision =
System.Reflection.Assembly.GetExecutingAssembly.Ge tName.Version.Revision()

"Cary" <Ca**@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
In my project, I want to display the version number on the splash screen
and
in the help section of my application. I have a variable I created called
appVersion. When I go to my deployment project properties, the Version
number
is there. Is there a line of code that I can use where I can assign the
version number to the appVersion variable, something like
"appVersion=system.deploymentapp.properties.versio n" but that actually
works?

Many thanks,
--
Cary


Nov 21 '05 #3

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

Similar topics

2
8257
by: Kendal Goodrich | last post by:
In the setup project I am trying to create, I am wanting to search to see if DirectX 8 is installed on the local machine. I figured the best way to determine would be a registry key search, so I...
6
2007
by: Paul | last post by:
Hello everyone: I am developing a VB.Net Windows Application and I am now ready to create the deployment project for it. This application needs to be installable on a different number of users...
0
1388
by: Mystery Man | last post by:
We want to deploy a large CSharp/SQL Server system. We are successfully using the 'setup project' (under setup and deployment projects) to build our deployed system. With our stored...
1
2700
by: Steve | last post by:
I am having an issue deploying an ActiveX control. This is a .NET project in C#. The ActiveX control is written in VB6. I use the PDW (Package and Deployment Wizard) to create a .CAB for the...
2
1672
by: Scanner2001 | last post by:
This may not be the best group to post to, so if there are any suggestions as to a different group, please let me know. Here is what we are doing, we have a couple of dlls that are shared (i.e....
2
6227
by: Jim McGivney | last post by:
In asp 2.0 I am trying to insert a row using a detailsview control connected to an accessDataSource. I get the error message below. I am having trouble identifing which data field is causing the...
4
1621
by: Chuck P | last post by:
I was wondering what practices people have come up with for deployment. I want to precompile the application and encrypt portions of the web.config. In 1.0 I just did a batch file that would...
2
13823
by: Bill Nguyen | last post by:
I ran into this error trying to run an app from Publish.htm. I can't find what is wrong with the deployment. Thanks a million Bill -------- PLATFORM VERSION INFO
0
2047
by: dfrench | last post by:
I have a visual studio 2008 solution(win forms) I have a Deployment project with it to install the software I upgrade the version number on the deployment project and build it When I run this on...
0
7198
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
7072
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
7271
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
7319
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
7449
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...
1
4998
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
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.