Click here to Skip to main content
15,892,480 members
Articles / .NET

Versioning Controlled Build

Rate me:
Please Sign up or sign in to vote.
4.90/5 (237 votes)
8 Dec 2013CPOL35 min read 2.2M   20.6K   779  
A Visual Studio add-in and command-line utility that automates versioning of .NET and VC++ projects
History

ver. 1.0
- Initial release (posted on 15th January, 2004).

ver. 1.1
- Support for VB.NET projects and some cosmetic changes in the UI. Note that the installer for this version will automatically remove the previous one.

ver. 1.2
- Support for Managed VC projects added, text encoding set to default (enabling the use of extended characters), MessageFilter added to handle COM messages that often blocked the application, projects with missing AssemblyInfo file are displayed too, buttons to increment Major, Minor, or Build versions for selected projects added (Revision is incremented always by default), and a Save button that only saves updated AssemblyInfo files added.

ver. 1.3
- Settings dialog added, settings are stored between sessions (c.f. "Settings" section above), and some bug fixes.

ver. 1.4
- Direct build of projects, extra toolbar/menu, and support for VJ# as well as VB and C# smart devices projects added. More robust support for checking-out files under SourceSafe control. Project is made ready for localization. Hopefully fixed the problem of add-in not running on localized versions of Visual Studio.

ver. 1.5
- "Enterprise Template Project versions not processed" bug fixed, added support for versioning in resources file (c.f. "Settings" section).

ver. 1.6
- "Database project bug" fixed, improved installation/uninstallation by fixing the "Disappearing icons" bug.

ver. 1.7
- "SourceSafe checkout bug" and "Odd cosmetic bug" (as noticed by normanr) have been fixed.

ver. 1.8
- "AssemblyInformationalVersion bug" and a problem with checking out Visual C++ projects that contain both resource and AssemblyInfo files have been fixed.

ver. 1.9
- "Enterprise Templates Subprojects not shown" bug introduced with ver. 1.8. has been fixed.

ver. 2.0
- Support for VS 2005 (please note that the add-in was tested on beta 2 version of VS 2005 only; I had no opportunity to test the add-in on the release version of the IDE yet). Additional option in Settings added to select which part of the version is incremented by default. Minor bug fixes. Solution rearranged to allow simultaneous builds for VS 2002/2003 and VS 2005.

ver. 2.1
- Fixed installation problems from ver. 2.0, added separate tabs for AssemblyVersion, AssemblyFileVersion, and AssemblyInformationalVersion (i.e. product version). Note: this version works with VS2002/2003 and VS2005. However, in some cases, icons on the toolbar / menus of VS 2005, for some unknown reason, will not be displayed.

ver. 2.2
- Code refactoring, minor bug fixes (e.g. space around version string problem), minor changes in GUI (scroll position synchronization between tabbed listviews, highlighting color configuration), implemented in-line editing of "to be version", report dialog added for batch commands, added support for setup projects.

ver. 2.3
- Solution folders not displayed bug has been fixed; installation packages have been split (there is a setup for VS2002/2003/2005, and a separate setup for systems with VS2005 only); toolbars/menus have been made permanent, so users can modify the corresponding icons (in case they are not displayed in VS2005); projects in the listview are displayed in the same order as in the Solution Explorer (setup projects being placed at the end); projects in solution folders and in Enterprise Templates can be displayed indented (as selected in the Appearance tab of the Setup dialog). Known problems: conflict with some third party add-ins.

ver. 2.4
- Command line-utility that supports VC++ 6.0 DSW files as well as VS2002/2003/2005 SLN files included into setup (please check CommandLine.txt file for a brief description);
- Some code reorganization and refactoring, some minor bug-fixes.

ver. 2.5
- Command line-utility not recognizing projects with non-alphanumeric characters in project names bug fixed. Also some other minor bug fixes.

ver. 3.0
- Code refactored, some bugs fixed and new features implemented (I haven't tested the tool on Vista, so please check Vista and Vista RC2 messages for installation issues). Addin can be installed on Visual Studio 2008 (beta2) and command line utility can be used with Visual Studio 2008 projects.
- Multiplying buttons and menu items in VS2005 after repair procedure bug fixed.
- Invalid path bug fixed; this solves the problem of projects on network shares too.
- Setup projects inside Solution Folders are now processed correctly.
- Versions for Web projects not displayed bug fixed. It should work in command-line utility too. On first start-up, utility checks if IIS is installed and should automatically fetch corresponding root folder. This folder is displayed in Folders tab of Settings dialog, but can be modified manually.
- Invalid path to SourceSafe command-line bug fixed. Moreover, this path can be set manually in Folders tab of Settings dialog.
- Option to restart Build and Revision from 1 added to configuration (Numbering Scheme tab).
- Option to save all files before addin command start added to configuration (General tab).
- If FileVersion and ProductVersion in resource (*.rc) file of C++ project do not contain all components (Major.Minor.Build.Revision), only existing components in .RC file are updated.
- If C++ project contains multiple resource (*.rc) files with version strings, versions in all files are updated.
- Option to define step for version increment added (Numbering Scheme tab).
- Option to enter arbitrary text for AssemblyInformationalVersion (i.e. Product version for non C++ projects) (General tab). This option works with command-line utility too.
- It is possible now to enter any version increment into "To Version" box of GUI by preceding it with '+' character, e.g. "1.0.0.+10" (increment current revisions by 10).
- Command-line utility has been completed. Check the CommandLine.txt user's guide (installed with the utility) for details. Please note that several command-line switches have been modified/renamed.

ver. 3.1
- Option to print current versions or save them to a text/CSV file added, Windows visual styles are now supported, some bug fixes.
  
  Note: If you have installed version 3.0 for VS2005/2008 on a system with VS 2008, because of a bug in its installation you have to follow the next procedure:
  1. Uninstall the previous version first
  2. Check if commands (not toolbar/menu) still exist in VS2008: Tools - Customize - Commands tab, in Categories list select Addins and see if it contains GUI, Build, Rebuild, Save, Configure and About entries. If any of them exists, run following command from Visual Studio 2008 command prompt:
       devenv /resetaddin BuildAutoIncrement.Connect
     This command will cleanup commands left.
  3. Run the new setup

ver. 3.2
- Supports Visual Studio 2010 projects
- Merge module, Cab and Web setup projects supported
- SourceSafe folder now correctly identified on 64-bit systems
- /V flag in comman-line tool now works correctly

ver. 3.3
- Two setups are available: BuildAutoIncrement.msi for add-in with permanent VCB toolbar/menu and BuildAutoIncrementTemporaryBars.msi for add-in with temporary VCB toolbar/menu. Functionality of both is same except for differences in customization options (for detailed explanation on difference between permanent and temporary commandbars please check the article at http://www.mztools.com/articles/2008/MZ2008019.aspx). Setup with permanent toolbar/menu provides higher flexibility for customization but in some cases (e.g. when other add-ins are used in Visual Studio) it may cause disappearing or multiplying toolbar/menu.
- Solved the problem of multiplying menu/toolbar items each time Visual Studio 2010 is started (se previous item)
- F# projects are displayed and solution folder which contains F# project(s) is displayed correctly with all projects inside it
- Setup, Merge module, CAB and Web setup projects versions displayed correctly
- GUI opens normally when visual themes are disabled for Visual Studio
- During uninstallation, an option dialog is shown which allows user to select if VCB menu and toolbar should be removed automatically. Automatical removal may reset user customizations in Visual Studio and can affect other add-ins installed so user is offered an option to manually remove VCB menu and toolbar.

ver. 3.4
- Supports Visual Studio 2012 and 2013 (tested on public preview)
- Command-line utility supports .vcxproj (C++ project file format introduced with Visual Studio 2010)
- Support for InstallShield LE included
- Add-in for Visual Studio 2008/2009/2010/2012/2013 uses XML file based registration. Add-in for Visual Studio 2003 and 2005 still use COM based registration.

ver. 3.5
- Problem with menu index fixed.
- Addin support for TFS brought back.

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Croatia Croatia
Graduated at the Faculty of Electrical Engineering and Computing, University of Zagreb (Croatia) and received M.Sc. degree in electronics. For several years he was research and lecturing assistant in the fields of solid state electronics and electronic circuits, published several scientific and professional papers, as well as a book "Physics of Semiconductor Devices - Solved Problems with Theory" (in Croatian).
During that work he gained interest in C++ programming language and have co-written "C++ Demystified" (in Croatian), 1st edition published in 1997, 2nd in 2001, 3rd in 2010, 4th in 2014.
After book publication, completely switched to software development, programming mostly in C++ and in C#.
In 2016 coauthored the book "Python for Curious" (in Croatian).

Comments and Discussions