Click here to Skip to main content
15,895,142 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
This document provides information on changes done during the setup in order to
undo these changes easier in the case something goes wrong or if uninstallation
fails.


WHAT IS CHANGED DURING SETUP

Besides executable files being extracted into destination folder, some keys
may be created in the registry (required for COM based add-in registration) and
AddIn files (required for XML based add-in registration) are copied to 
predefined folders.
When add-in or command-line tool is run, configuration files are created.
If uninstallation runs correctly, all those items should be removed.


Registry Changes

Add-in for Visual Studio 2003 and 2005 use COM based registration. Thus, if 
add-in is installed and setup detects one of these versions of Visual Studio,
following registry keys are created:

1. For Visual Studio 2003:
   Software\Microsoft\VisualStudio\7.1\AddIns\BuildAutoIncrement.Connect
2. For Visual Studio 2005:
   Software\Microsoft\VisualStudio\8.0\AddIns\BuildAutoIncrement.Connect
   
Above keys are created in HKCU or HKLM hive, depending on whether software is 
installed for the current user only or for all users, respectively. Keys created
contain standard values required to activate the add-in.

For COM based registration, add-in entry point must be registered:  
HKEY_CLASSES_ROOT\BuildAutoIncrement.Connect
HKEY_CLASSES_ROOT\TypeLib\{C9FFA76C-560F-37D0-A1AD-A9C4EB3D25C2}
HKEY_CLASSES_ROOT\(Wow6432Node\)CLSID\{D5551771-D3FB-4253-839C-B415ACA9BA22}
HKEY_CLASSES_ROOT\(Wow6432Node\)TypeLib\{C9FFA76C-560F-37D0-A1AD-A9C4EB3D25C2}
HKEY_CURRENT_USER\Software\Classes\TypeLib\{C9FFA76C-560F-37D0-A1AD-A9C4EB3D25C2}
HKEY_CURRENT_USER\Software\Classes\(Wow6432Node\)CLSID\{D5551771-D3FB-4253-839C-B415ACA9BA22}
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\BuildAutoIncrement.Connect
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{C9FFA76C-560F-37D0-A1AD-A9C4EB3D25C2}
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\(Wow6432Node\)CLSID\{D5551771-D3FB-4253-839C-B415ACA9BA22}
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\(Wow6432Node\)TypeLib\{C9FFA76C-560F-37D0-A1AD-A9C4EB3D25C2}
HKEY_LOCAL_MACHINE\SOFTWARE\(Wow6432Node\)Classes\CLSID\{D5551771-D3FB-4253-839C-B415ACA9BA22}
HKEY_LOCAL_MACHINE\SOFTWARE\(Wow6432Node\)Classes\TypeLib\{C9FFA76C-560F-37D0-A1AD-A9C4EB3D25C2}


Addin files

For Visual Studio 2008 and newer, XML file based registration is used. During 
the setup, VCB.Addin file is created and copied to predefined folders which are
scanned by Visual Studio instances when they are run.

If add-in is installed for the current user only, AddIn file is copied to 
%VSAPPDATA%\AddIns folder.
For Visual Studio 2008 that folder is
C:\Users\<username>\AppData\Roaming\Microsoft\VisualStudio\9.0\AddIns"
or
C:\Documents and Settings\<username>\Application Data\Microsoft\VisualStudio\9.0\AddIns

If add-in is setup for all users, AddIn file is copied to
%VSCOMMONAPPDATA%\AddIns folder.
For Visual Studio 2008 that folder is
C:\ProgramData\Microsoft\VisualStudio\9.0\Addins
or
C:\Documents and Settings\All Users\Application Data\Microsoft\VisualStudio\9.0\Addins

For other versions of Visual Studio, number in the path is replaced by:
"10.0" for VS 2010,
"11.0" for VS 2012 or
"12.0" for VS 2013.

You may find additional information on AddIn file placement here:
http://www.mztools.com/articles/2008/MZ2008001.aspx 


Configuration files

When tool is run, two additional configuration files are created:

1. Configuration.xml contains general tool settings which can be edited by the 
   user either through "Configure VCB" menu shortcut on Windows Start menu or 
   from Visual Studio (selecting Settings from VCB menu);
2. UiSettings.xml contains toolbar and menu settings and is updated each time
   add-in is closed.
   
Both files are created in current users profile, e.g. in
C:\Users\<usernam>\AppData\Roaming\Versioning Controlled Build
or
C:\Documents and Settings\<username>\Application Data\Versioning Controlled Build
folder.

During uninstallation, user is prompted to confirm if she/he wants to delete 
these files.

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