473,657 Members | 2,597 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=sys tem.deploymenta pp.properties.v ersion" but that actually works?

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

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

s_VersionMajor =
System.Reflecti on.Assembly.Get ExecutingAssemb ly.GetName.Vers ion.Major()
s_VersionMinor =
System.Reflecti on.Assembly.Get ExecutingAssemb ly.GetName.Vers ion.Minor()
s_VersionBuild =
System.Reflecti on.Assembly.Get ExecutingAssemb ly.GetName.Vers ion.Build()
s_VersionRevisi on =
System.Reflecti on.Assembly.Get ExecutingAssemb ly.GetName.Vers ion.Revision()

"Cary" <Ca**@discussio ns.microsoft.co m> wrote in message
news:2B******** *************** ***********@mic rosoft.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=sys tem.deploymenta pp.properties.v ersion" 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.Reflecti on.Assembly.Get ExecutingAssemb ly.GetName.Vers ion.Major()
s_VersionMinor =
System.Reflecti on.Assembly.Get ExecutingAssemb ly.GetName.Vers ion.Minor()
s_VersionBuild =
System.Reflecti on.Assembly.Get ExecutingAssemb ly.GetName.Vers ion.Build()
s_VersionRevisi on =
System.Reflecti on.Assembly.Get ExecutingAssemb ly.GetName.Vers ion.Revision()

"Cary" <Ca**@discussio ns.microsoft.co m> wrote in message
news:2B******** *************** ***********@mic rosoft.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=sys tem.deploymenta pp.properties.v ersion" 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
8278
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 add one. The problem comes in with the properties for the registry key search. The properties are RegKey and Value. In viewing the registry editor, the registry key is Software\Microsoft\DirectX. Within that, you have a value name and a value...
6
2025
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 / clients, and the application has an Access DB out on their network. How can I create a deployment routine where I can have a dialog box prompt for the network share (i.e. \\server\dbfolder) at install-time? Once network the share is specified...
0
1403
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 procedures, we would ideally like the facility to be able to automatically add all our stored procedures in SourceSafe/disk to the deployment project without having one of us having to select them manually and adding them. That way, we could build our...
1
2710
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 control. The problem is that sometimes the ActiveX control installs successfully and sometimes it doesn't. We have various test machines running different operating systems. On one machine, running Windows 2000, SP4, the control installs...
2
1682
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. used by a number of other dlls and applications). These dlls have their own setup process, built with VS2003 setup and deployment package. They are strongly named and have keys. We specify to deploy to the GAC only on the target production server....
2
6235
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 problem. Any suggestings are welcomed. Jim ************* You tried to assign the Null value to a variable that is not a Variant data type. Description: An unhandled exception occurred during the execution of the current web request. Please...
4
1625
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 copy %source%\*.aspx %web%\*.* copy %source%\bin\*.dll %web%\bin\*.* rem copy %source%\web.config %web%\*.* Would rem out web.config because of changes in web.config. Such as
2
13843
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
2060
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 the destination machines everything appears to work fine (no errors). However when the application is opened on the deployment machines it has not upgraded. We have to manually uninstall teh application first then run the deployment project. ...
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8730
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6163
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system
2
1607
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.