Visual Studio add another minor release number

15 Views Asked by At

I use file versioning linked with assembly and file version.

Currently, I already use the 4 available numbers (Major, Minor, Build Number, Revision).

I was wondering if it was possible to append another "Patch" version to the file versions. Is it possible? How could I do that? NOTE: manually is ok, as I would only use it for very special cases

1

There are 1 best solutions below

0
Lasse V. Karlsen On

The two version resources, "Assembly Version" and "File Version" only has room for 4 distinct 16-bit numbers (0-65535).

If you want to store more information, like a 5th number or even a git/mercurial changeset SHA, you can use AssemblyInformationalVersionAttribute:

[assembly: AssemblyInformationalVersion("1.2.3.4.5")]

This is, however, a string, so you can stuff whatever you want in there.

Be aware that any tool that looks for the version of the file will normally only report one of the version resources that has room for 4 numbers.

Note: I assume this is for .NET since you mention assemblyversions as a tag. How to specify this kind of thing for C++ I have no idea.