According the documentation, the Version
property override the version on packing, instead, use the VersionPrefix
.
<PropertyGroup>
<VersionPrefix>1.0.0</VersionPrefix>
</PropertyGroup>
And use the command to pack solution:
dotnet pack --version-suffix beta
Optionally you can set VersionPrefix
and VersionSuffix
in .csproj
file.
<PropertyGroup>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>alpha</VersionSuffix>
</PropertyGroup>