How to set leading zeros in AssemblyVersion, for example, "2.03.406.2" in .net

just adding zero as shown below

[assembly: AssemblyVersion("2.03.406.2")]

leads to 2.3.406.2

what I do not want.

So what can it be impossible?

+3
source share
3 answers

Each part of the build version is stored as a 16-bit integer, so no, this is not possible.

+7
source

Maybe you can read AssemblyFileVersionAttribute

AssemblyFileVersionAttribute[] attributes = (AssemblyFileVersionAttribute[])typeof(Program)
    .Assembly.GetCustomAttributes(typeof(AssemblyFileVersionAttribute), false);
Console.WriteLine(attributes[0].Version);
+2
source

, , , .

.

+1

Source: https://habr.com/ru/post/1703193/


All Articles