473,543 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Auto Increment Version in VB 2005

vul
In VB6 there is Auto Increment check box in Project Properties, which allow
you have a new version every time you compile the project.
Is there any easy way to have this feature in VB 2005?
Some of my blocks of code check and compare versions of EXE and DLLs located
on the local workstation and the server. So it's very important for me to
have an incremented number in case the project was rebuilt. It can be done
manually, of course, but I miss VB6 feature.

Thank you
Al
Jul 31 '06 #1
5 5100
vul wrote:
In VB6 there is Auto Increment check box in Project Properties, which allow
you have a new version every time you compile the project.
Is there any easy way to have this feature in VB 2005?
Some of my blocks of code check and compare versions of EXE and DLLs located
on the local workstation and the server. So it's very important for me to
have an incremented number in case the project was rebuilt. It can be done
manually, of course, but I miss VB6 feature.
In VB 2005, the version number is incremented when you Publish the app.

1. Right click on the project and choose Properties
2. Click on the Publish tab
3. At the bottom you will see Publish Version and a check box to auto
increment it.

Aug 1 '06 #2
You can open the AssemblyInfo.vb file directly and change the following
lines:

' You can specify all the values or you can default the Build and Revision
Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion ("1.0.*")>

<Assembly: AssemblyVersion ("1.0.0.0")>

The second AssemblyVersion line uses a fixed assembly version, the first
(that's commented out) uses a "sequencial ". Its sequencial in the fact that
it encodes the date & time of the build that is set VS started (multiple
builds within one VS session will normally have the same build & revision
numbers).

Alternatively you can set the various parts of the Assembly Version fields
to * under "Project - xxx Properties - Application - Assembly Information"
Alternatively there are various "add-ins" available for MSBuild (the
underlying build engine in VB 2005) that will autoincrement the assembly
version, such as:

http://weblogs.asp.net/bradleyb/arch...02/432150.aspx
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"vul" <aa*@optonline. netwrote in message
news:e4******** ******@TK2MSFTN GP03.phx.gbl...
| In VB6 there is Auto Increment check box in Project Properties, which
allow
| you have a new version every time you compile the project.
| Is there any easy way to have this feature in VB 2005?
| Some of my blocks of code check and compare versions of EXE and DLLs
located
| on the local workstation and the server. So it's very important for me to
| have an incremented number in case the project was rebuilt. It can be done
| manually, of course, but I miss VB6 feature.
|
| Thank you
| Al
|
|
Aug 1 '06 #3
Jay B. Harlow [MVP - Outlook] wrote:
You can open the AssemblyInfo.vb file directly and change the following
lines:

' You can specify all the values or you can default the Build and Revision
Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion ("1.0.*")>
Hi Jay

In Jeffry Richter's book, "Applied Microsoft .Net Framework
Programming", Microsoft Press, 2002, he says not to use that feature:

Quote:

The CSC.exe and AL.exe tools support the ability to automatically
increment the assembly version number with each build. 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.

End Quote

Do you know if the issues he refers to still exist in VS2005?

Just curious.

Chris

Aug 1 '06 #4
Al
Chris,
thank you.
I'm working on Class Library project (DLL) in VB 2005.
DLL is going to be on the server and VB6 client will compare the versions of
DLL on the workstation and on the server, in case they are different the
workstation DLL will be replaced with the server instance.
Of course I can manually increment the version number, but it's an extra
step, and being spoiled by VB6 auto increment, it's possible to forget to do
that.
Unfortunately I do not see Publish Tab in Project properties for Class
Library project. I have that tab for Wondows Application project though.

Al

"Chris Dunaway" <du******@gmail .comwrote in message
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
vul wrote:
>In VB6 there is Auto Increment check box in Project Properties, which
allow
you have a new version every time you compile the project.
Is there any easy way to have this feature in VB 2005?
Some of my blocks of code check and compare versions of EXE and DLLs
located
on the local workstation and the server. So it's very important for me to
have an incremented number in case the project was rebuilt. It can be
done
manually, of course, but I miss VB6 feature.

In VB 2005, the version number is incremented when you Publish the app.

1. Right click on the project and choose Properties
2. Click on the Publish tab
3. At the bottom you will see Publish Version and a check box to auto
increment it.

Aug 1 '06 #5
Chris,
I agree with his statement 99%, especially when you don't rebuild all
related projects at the same time. I wouldn't say its a bug as much as
intended behavior! You want the referencing assemblies to break if you make
a "material" changes aka a breaking change. The compile is just assuming
that *ALL* changes are "material" changes.

I use the feature extensively as I normally have all related projects in a
single solution & rebuild all at the same time... Also with refactoring its
not uncommon for me to very easily introduce a material change. Ergo I'm
assuming that *ALL* my changes are "material" changes.

FWIW:
<quote>
| You should definitely modify this file and hard-code all
| four parts of the assembly version number.
</quote>
Is also a bug waiting to happen, if you make a "material" change in one
assembly & forget to increment the version #, then the assembly will
continue to load & run. If the "material" change is such that it is rarely
executed, it could be a while before the change causes your program to
crash.

| Do you know if the issues he refers to still exist in VS2005?
Yes.

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
"Chris Dunaway" <du******@gmail .comwrote in message
news:11******** **************@ 75g2000cwc.goog legroups.com...
| Jay B. Harlow [MVP - Outlook] wrote:
| You can open the AssemblyInfo.vb file directly and change the following
| lines:
| >
| ' You can specify all the values or you can default the Build and
Revision
| Numbers
| ' by using the '*' as shown below:
| ' <Assembly: AssemblyVersion ("1.0.*")>
| >
|
| Hi Jay
|
| In Jeffry Richter's book, "Applied Microsoft .Net Framework
| Programming", Microsoft Press, 2002, he says not to use that feature:
|
| Quote:
|
| The CSC.exe and AL.exe tools support the ability to automatically
| increment the assembly version number with each build. 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.
|
| End Quote
|
| Do you know if the issues he refers to still exist in VS2005?
|
| Just curious.
|
| Chris
|
Aug 1 '06 #6

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

Similar topics

5
2999
by: diong | last post by:
i have a field with a list of wrong ID (random) and i wish to replac them with a sequential (auto-increment) value. how to remove the valu and to add in the sequential ID? Im a newbie in ASP! Pls Help - dion ----------------------------------------------------------------------- Posted via http://www.codecomments.co
2
12703
by: Tom | last post by:
I am trying to store information into a table that has an auto increment field. There is currently no data in the table. Using the code below I cannot insert data into the table. I get an error telling me that "Number of query values and destination fields are not the same." If I add a value for the auto increment field to the SQL String...
6
5052
by: Alpha | last post by:
I retrieve a table with only 2 columns. One is a auto-generated primary key column and the 2nd is a string. When I add a new row to the dataset to be updated back to the database. What should I do with the 1st column ? (Below I have a "1" in place for now). Also, Does the datase.AcceptChanges(); updates the changes to the database? Which...
4
1876
by: Klaus Jensen | last post by:
Hi! In VB6 I could set an option, so that when the app was built, the version number (minor) would autoincrement. It was also possible to access version information via code to display in a splash-screen or similar. I have searched for this option in Visual Studio, but have yet to find it. And how can I access this information via code,...
5
1314
by: Kevin | last post by:
I have the auto increment checked, but it only increments when I reopen the project. I am using VS2003 educational version thanks kevin
5
5139
by: Pauloviè Michal | last post by:
hi all, I have problem with SERIAL field type (or sequence functionality). I have table with three columns - ID, IDS, NAME. I want auto-increment IDS grouped by ID. Example: 1, 1, Ferdo 1, 2, John 2, 1, Martin 1, 3, Elvira
2
20172
by: David Veeneman | last post by:
I am using the "1.0.*" pattern to auto-increment the AssemblyVersion attribute of my project's assembly. I'd like to have the assembly's AssemblyFileVersion attribute match this value, so that I can see the assembly version in the Windows XP Explorer. In other words, I'd like to synchronize the file version of an assembly to its assembly...
2
5513
by: john | last post by:
Is it true that if I split my access database in backend and frontend and I implement custom auto increment for the ID fields, that my database is ready to be used in a multi-user environment? I found a zillion messages about auto increment and read some of them but it's confusing. Can someone point me to a simple custom auto increment example...
13
4728
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when i type in the details. I have just moved over to mysql server with access as the front end. I have setup the sql tables with the customer number...
0
7341
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...
0
7584
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7729
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...
1
7332
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...
0
7677
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5880
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4884
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3385
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...
1
952
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.