Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

product version no

0 views
Skip to first unread message

John

unread,
Oct 26, 2003, 3:17:35 PM10/26/03
to
Hi

How can I change the product version number that is returned by
Application.ProductVersion?

Thanks

Regards


Ken Tucker [MVP]

unread,
Oct 26, 2003, 3:35:51 PM10/26/03
to
Hi,

You can change it in the AssemblyInfo.vb file.

Ken
--------------
"John" <jo...@nospam.infovis.co.uk> wrote in message
news:uj42Q4$mDHA...@tk2msftngp13.phx.gbl...

Jay B. Harlow [MVP - Outlook]

unread,
Oct 26, 2003, 3:51:14 PM10/26/03
to
John,
As Ken stated, you change it in the AssemblyInfo.vb file. Actually you
change it with AssemblyInformationVersion attribute, which I normally place
in the AssemblyInfo.vb file along with all the other attributes dealing with
the assembly.

Normally you will only find the AssemblyVersion attribute in the
AssemblyInfo.vb file. You can add the AssemblyInformationVersion and
AssemblyFileVersion attributes if you want. All three values will use
AssemblyVersion if you do not include the other two attributes.

AssemblyVersion - the version number of the assembly.
AssemblyInformationVersion - the version number of the product itself
AssemblyFileVersion - the version number of the file

In my current project I am using both the AssemblyVersion number & the
AssemblyInformationVersion.

Hope this helps
Jay

"John" <jo...@nospam.infovis.co.uk> wrote in message
news:uj42Q4$mDHA...@tk2msftngp13.phx.gbl...

John

unread,
Oct 26, 2003, 4:01:16 PM10/26/03
to
There is an * in the version number. Where is the value for * coming from?
Also, is there an automatic way to increase the no with every build?

Thanks

Regards


"Jay B. Harlow [MVP - Outlook]" <Jay_H...@email.msn.com> wrote in message
news:%23HsAsLA...@TK2MSFTNGP10.phx.gbl...

Jay B. Harlow [MVP - Outlook]

unread,
Oct 26, 2003, 5:04:45 PM10/26/03
to
John,

> Also, is there an automatic way to increase the no with every build?
The * in the version number, is the automatic way of changing the number
with every build, note it does not actually increment the number.

The * actually causes the current date & time to be encoded into the build
number, I'm not sure if its actual date & time or when you last started
VS.NET.

I believe the only way to get different behavior is to modify the file
during the build event with a VS.NET add-in or macro.

Hope this helps
Jay

"John" <jo...@nospam.infovis.co.uk> wrote in message

news:OB82sQAn...@TK2MSFTNGP12.phx.gbl...

Herfried K. Wagner [MVP]

unread,
Oct 26, 2003, 5:38:47 PM10/26/03
to
* "John" <jo...@nospam.infovis.co.uk> scripsit:

> How can I change the product version number that is returned by
> Application.ProductVersion?

Basic information on versioning:

<http://msdn.microsoft.com/library/en-us/dndotnet/html/managevers.asp>
<http://msdn.microsoft.com/library/en-us/dnbda/html/tdlg_ch5.asp>
<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 · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Chris Dunaway

unread,
Oct 27, 2003, 9:50:40 AM10/27/03
to
On Sun, 26 Oct 2003 16:04:45 -0600, Jay B. Harlow [MVP - Outlook] wrote:


> John,
>> Also, is there an automatic way to increase the no with every build?
> The * in the version number, is the automatic way of changing the number
> with every build, note it does not actually increment the number.
>

Jeffrey Richter, in his book, "Applied Microsoft .Net Framework
Programming", warns not to use the "1.0.*" syntax. He recommends that the
build number be specifically set to a value. In regards to the automatic
increment of the build number he states:

<QUOTE>
This feature is a bug and shouldn't be used because changing the assembly
version number will break any assemblies that reference this assembly. The
AssemblyInfo.cs file that Visual Studio .Net automatically creates for you
when you create a new project is in error: it sets the AssemblyVersion
attribute so that its major and minor parts are 1.0 and that the build and
revision parts are automatically updated by the compiler. You should
definitely modify this file and hard-code all four parts of the assembly
version number.
</QUOTE>

His book talks about versioning information in detail.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.

John

unread,
Oct 27, 2003, 5:45:44 PM10/27/03
to
I have got AssemblyVersion("1.0.*") in my assembly.vb. No matter how many times I reopen, change or rebuild the project, my build remains the same. For some reason automatic build increment is not working for me. Any ideas?
 
 
"Jay B. Harlow [MVP - Outlook]" <Jay_H...@email.msn.com> wrote in message news:e%23Oaw0A...@TK2MSFTNGP10.phx.gbl...

Jay B. Harlow [MVP - Outlook]

unread,
Oct 28, 2003, 10:20:51 AM10/28/03
to
John,
Not sure what to offer, as it works for me.

Which version of VS.NET are you using? VS.NET 2002, VS.NET 2003, a pre 2002
beta, or the Whidbey beta/preview?

Hope this helps
Jay

"John" <jo...@nospam.infovis.co.uk> wrote in message

news:%23RJxuvN...@TK2MSFTNGP12.phx.gbl...

John

unread,
Oct 28, 2003, 12:52:12 PM10/28/03
to
vs.net 2003 upgrade

"Jay B. Harlow [MVP - Outlook]" <Jay_H...@email.msn.com> wrote in message

news:e$eqccWnD...@TK2MSFTNGP10.phx.gbl...

0 new messages