PC Review


Reply
Thread Tools Rate Thread

Assign deployment version number to a variable

 
 
=?Utf-8?B?Q2FyeQ==?=
Guest
Posts: n/a
 
      29th Mar 2005
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.version" but that actually works?

Many thanks,
--
Cary
 
Reply With Quote
 
 
 
 
Robin Tucker
Guest
Posts: n/a
 
      29th Mar 2005

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

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



"Cary" <(E-Mail Removed)> wrote in message
news:2B1C6CE3-8577-4698-B84D-(E-Mail Removed)...
> 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.version" but that actually
> works?
>
> Many thanks,
> --
> Cary



 
Reply With Quote
 
=?Utf-8?B?Q2FyeQ==?=
Guest
Posts: n/a
 
      29th Mar 2005
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.GetName.Version.Major()
> s_VersionMinor =
> System.Reflection.Assembly.GetExecutingAssembly.GetName.Version.Minor()
> s_VersionBuild =
> System.Reflection.Assembly.GetExecutingAssembly.GetName.Version.Build()
> s_VersionRevision =
> System.Reflection.Assembly.GetExecutingAssembly.GetName.Version.Revision()
>
>
>
> "Cary" <(E-Mail Removed)> wrote in message
> news:2B1C6CE3-8577-4698-B84D-(E-Mail Removed)...
> > 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.version" but that actually
> > works?
> >
> > Many thanks,
> > --
> > Cary

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign a number to a variable from a query Judi Microsoft Access Form Coding 10 3rd Oct 2008 08:45 PM
How to Assign JavaScript variable to Jsp Variable Ranjan Microsoft ASP .NET 1 10th Apr 2007 04:35 PM
How to assign the value of the java script variable to a server side variable in C# code behind code? ravindravarman@gmail.com Microsoft Dot NET 1 5th Apr 2007 04:04 PM
Automatically Increase Deployment Package Version Number Dean Microsoft Dot NET 0 8th Nov 2005 01:54 PM
How do I assign a text value to a variable number of rows? =?Utf-8?B?SmRheQ==?= Microsoft Excel Worksheet Functions 6 20th Jun 2005 01:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:46 PM.