How to auto increment the version (eg. “1.0.*”) of a .NET Core project?

One simple way I did it previously is reading the current version and increase it by one, so you get current version and increment by one using command line.

I found this article would answers your question: https://sachabarbs.wordpress.com/2020/02/23/net-core-standard-auto-incrementing-versioning/


As indicated if you follow some of the links from the comments/answers, the most straightforward way to get .NET Framework-like version auto-incrementing in .NET Core 3/5/6 is to add to your .csproj:

<PropertyGroup>
   <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
   <Deterministic>False</Deterministic>
</PropertyGroup>

And add to your Program.cs:

[assembly: System.Reflection.AssemblyVersion("1.0.*")]

You may still want to read the links if there are other AssemblyInfo properties you want to set.