When talking about Version assemblies you would usually interact with AssemblyVersion, AssemblyFileVersion, AssemblyInformationalVersion Atrributes. Ability to successfully version assemblies is important while testing, debugging and deploying your assemblies. Why? Because it allows you and your team to inspect and debug same version of assemblies on one hand and to know what version of assemblies is are your customers using when talking about future requirements and current problems.

AssemblyVersion and AssemblyFileVersion

attributes

Can be manually located in your Solution explorer:

AssemblyInfo.cs

AssemblyInfo.cs file you can manually change values of a few Attributes. But now we will take look at AssemblyVersion and AssemblyFileVersion attributes. Both these Attributes provide default value in string format. Default values  should appear like this when you initially create project:

Number values inside string have specific meaning:

  1. value -> major value. Value should be changed when changes to your program are noticeable, like major User interface and under the hood changes
  2. value -> minor. increment this value when adding new capabilities to your Application.
  3. value -> build number. Obviously this value should be incremented when running a build
  4. value -> revision. Value that you should increment when choosing which build version to deploy

Build number and revision can be automated by using asterisk(*). Just change strings too look like this and their values will be incremented automatically after each build:

If you are developing small scale application it is best to change minor and major values manually.

AssemblyVersion attribute is used by other assemblies. When value of this attribute is changed, all assemblies that reference it must change value to match current value to ensure that communication between them will proceed uninterrupted.

AssemblyFileVersion attribute is used for deployment (when you ship assemblies to end user). You always need to know which version of assembly is shipped to your customer so that you can assist them, detect bugs and plan future changes.

AssemblyInformationalVersion

Usually you would not like to bore or even worse scare customers by displaying version of your Application in format like 8.56.7520.1459. You will want to display assembly version in user friendly format like 8.56 RC or 8 Orange, or any other format that will appeal to end user. This is where AssemblyInformationalVersion steps in. We can declare AssemblyInformationalVersion inside AssemblyInfo.cs file.

Nice. Please show me how to access these values.

First of. make sure that your AssemblyInfo.cs files has following values:

And inside main Method put following code:

This post has thought you how to version assemblies and was first post in Manage assemblies topic. Now we will continue to topic on how to strong name your assembly.