In that case, by *
in your file AssemblyInfo.cs
you are getting the amount of seconds passed since midnight (following the Coordinated Universal Time) divided by two.
To make the increment with only one digit, I suggest you take a look at Build Version Increment. The official versions cover until the VS 2010, but you can get a modification for the 2012 here. By accessing the settings, you can change the versioning style of the last identifier (home) to Increment, adding +1 to each compilation.
Alternatively, you could follow the usage pattern of *
[assembly: AssemblyVersion("x.x.*")]
to assign the number of days passed since the beginning of January 2000 to the second-to-last version indicator, and to the last the seconds count as shown above. Then all you have to do is make a comparison "Datetime" to determine the latest version as required.
Note: I suggest that you carefully analyze how versioning identification will be done because by adapting it to the development characteristics of the project, the management of the teams' results or development steps becomes more functional. Adapting to MSDN documentation, version can be briefly represented as follows: VersãoPrincipal.VersãoMenor.Compilação.Revisão
- Main Version: can indicate a rewrite of the product in which it is not guaranteed the compatibility with previous versions, indicating the making of extensive modifications.
- Minor Version: may represent a point of release of the product in which minor modifications were included, and may or may not be compatible.
- Compilation: represents the recompilation of the code, and its number can be modified in case of change of processor, platform or compiler.
- Revision: consists of minor repairs that tend to ensure full compatibility with previous versions.
However, in certain cases it may be feasible to reverse the last two identifiers (compilation and revision). In this way, the revision could represent a repair (without the insertion of new functionalities) to the lasso of a Minor Version, and the compilation could simply identify the latter build in question.
Related: http://answall.com/questions/2867/incrementar-versao-automaticamente-obternumero-versao-via-codigo
– Guilherme Agostinelli