Hi. I'm new to dotnet core, and I need the build system to generate a patch number when running dotnet build and dotnet pack, so that the assembly version, assembly file version and nuget package version are all the same. E.g. dotnet build --version 1.0.1251923.
Is this possible? So far I've only seen the number having to be entered by hand in the project file using <Version>1.0.123</Version>.
Thanks for any help!
Version is an MSBuild property, so you can specify it using the /p: syntax. E.g.:
dotnet build /p:Version=1.0.123
Though 1.0.1251923 is not a valid version.
Closing because @svick is correct. It can be passed in on the command line.
Most helpful comment
Versionis an MSBuild property, so you can specify it using the/p:syntax. E.g.:Though 1.0.1251923 is not a valid version.