- I want to use the
VersionPrefix property inside my csproj to define my package's semver 2.0 (3-part) version.
- I want to attach a 4th part and build metadata on the command line.
In other words, I want to have the version be, e.g. "1.2.3.4+f0c432"
Where 1.2.3 is stored in the csproj
and .4 comes from the CI environment
and +40c432 is the commit hash.
The problem I've run into is that using --version-suffix automatically makes it a pre-release version, which I don't want.
Even if I ignore the 4th number (build number), I can't even do this:
dotnet build MyProj --version-suffix "+f0c432"
Because:
/usr/local/share/dotnet/sdk/2.2.107/NuGet.targets(114,5): error : '1.2.3-+f0c432' is not a valid version string
VersionPrefixproperty inside mycsprojto define my package's semver 2.0 (3-part) version.In other words, I want to have the version be, e.g. "1.2.3.4+f0c432"
Where
1.2.3is stored in thecsprojand
.4comes from the CI environmentand
+40c432is the commit hash.The problem I've run into is that using
--version-suffixautomatically makes it a pre-release version, which I don't want.Even if I ignore the 4th number (build number), I can't even do this:
Because: