How to force visual studio to automatically increase the build number?

75 Views Asked by At

I modified the AssemblyInfo.cs file

At the end of the file

[assembly: AssemblyVersion("0.6.*")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

And I assumed that now the assembly version will change automatically when the application is compiled. But no. The version is frozen at 0.6.8717 and is not increasing further.

What did I do wrong?

1

There are 1 best solutions below

1
User12345 On

That's because you just use AssemblyVersion only 3 digit. That's why it only changes once a day. Try to update with this code

[assembly: AssemblyVersion("0.6.*.*")]

The third number (the build number) is the number of days since 2000-01-01. The fourth number (the revision number) is the number of seconds since midnight divided by 2.

Here is a sample project about increasing AssemblyVersion automatically.