Assembly Numbers Tool

An unsophisticated little tool that I built for my own purposes which I offer to others if they have a use for it. (Note: The page here may be behind the version offered from time to time as upgrades occur but it will catch up.)

You may download the installer for the tool as a setup executable file or as a zipped file you can extract and install.

NO WARRANTY OF ANY kind IS GIVEN. THE PROGRAM IS SUPPLIED AS IS AND YOU USE IT AT YOUR OWN RISK.

Abstract

The DAS Assembly numbers tool allows you to set the assembly number version for all elements of a project to the same version number, and to the number of your choice, at the same time. It should work with VB projects/solutions and C# projects/solutions in VS2005 and VS2010 and/or the Express versions of those languages, and with Sharp Develop I think. Not tested on VS2012 but in use on VS2013.

Details

In it’s current form all assembly version numbers and file version numbers are set to the same number so that the elements of a project – it’s main executable file and satellite dynamic link libraries – are numbered consistently. I have no particular need of maintaining file versions that are different to the assembly versions, but if that is something that you need just leave a comment and I am sure I can add it.

When you initially start the program you select the project file which is the primary project, either .vbproj or .csproj, and then the top level folder in the solution. You do this by clicking the New Project button at the left hand side of the top tool bar.

dasan-main
(Click the Image for a larger/clearer version)

You will now get two dialogue boxes in succession. The first allows you to select the prime project in the solution and the second selects the top level folder in the solution. Unfortunately if you do not use this style of layout then the tool may not work for you.

Here is an example of a test layout for a C# solution where the prime project is WindowsApplication1 and the top level folder is CSharpTest.

dasan-csharp

This is a single VB project

dasan-vb

Select the prime project solution file

dasan-csharp-2

In the next dialogue select the top level folder for the solution – in this case the folder above the one containing the prime project. The dialogue should open located on the folder for the prime project so just click the one above.

dasan-csharp-3

The main screen should look like this after you have loaded a project. Each lines contains a project in the solution, the assembly version, the file version and a check box which allows you to exclude a project from the numbers upgrade if you wish.

dasan-main-2
(Click the Image for a larger/clearer version)

dasan-main-3
(Click the Image for a larger/clearer version)

You can now change any of the 4 elements of the version number, including going backwards if you really wish. Let us say as an example you want to make the new number this………

dasan-csharp-5

Set the values and click on Upgrade The Values BUT first if you wish to save this solution so you can easily get to it again you should decide if this is going to be the Master Project – the first one to load when you open the program – or not. To set this check or uncheck the Master Project check box. (It will be unchecked if this is the first use of the program or you have not set a master project.)

If you set this as the master project the project folder name appears in the mater project label bottom left.

dasan-csharp-6

When you click the upgrade button you see:

dasan-csharp-7

Click OK and if everything is OK you will see:

dasan-csharp-8

The AssemblyInfo.cs file before we started looked like this for WindowsApplication1

dasan-csharp-4

And after looks like this:

dasan-csharp-4b

The process is identical for VB solutions so I won’t describe the process all over again 🙂

You can add solutions so that when the programs load they are contained in the combo box. The solutions can be either VB or CSharp. Here is a VB solution that only has one project being added. All you need to do is to save the project using ‘Save’ or ‘Close & Save’.

dasan-vb-5
(Click the Image for a larger/clearer version)

The next time both solutions will be in the combo box.

dasan-vb-6

If you change the Master Project you should close and reload before continuing.

Advertisements

One Response to Assembly Numbers Tool

  1. Pingback: .Net Assembly Version Numbers Tool | DA Software

Feel free to leave a reply (All moderated)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s