MSBuild targets for updating Assembly version during build process. AssemblyInfo can be set by initializing MSBuild property $(AssemblyVersionNumber) before MSBuild target AssemblyVersionUpdate is called.
$ dotnet add package MSBuild.AssemblyVersionNo README available.