The King
The King

Reputation: 849

Change Assembly Version in C#

I have created a C# Application and want the version of assembly to be: 01.02.03.123

I have changed the following value in AssemblyInfo.cs

[assembly: AssemblyFileVersion("01.02.03.123")]

But, when I Build the project, and see the File Version of my assembly it shows as 1.2.3.123

How can I get "01.02.03.123" as the version.

Upvotes: 0

Views: 1033

Answers (2)

Pierre
Pierre

Reputation: 21

Version.Major.ToString("00") + "." + Version.Minor.ToString("00") + "." + Version.Build.ToString("00") + "." + Version.Revision.ToString("00");

Upvotes: 2

evilone
evilone

Reputation: 22740

Each portion of the assembly version is stored as a 16-bit integer, so no, it's not possible to start those numbers with leading zeros.

Upvotes: 3

Related Questions