Home: SemVer 2.0 - nuget pack with provided version ignores metadata (3.5.0-rtm-1938)

Created on 12 Oct 2016  路  5Comments  路  Source: NuGet/Home

Hi, using the latest 3.5.0 build I am getting the following behaviour. (3.5.0-rtm-1938)

Nuget.exe pack -Version 1.0.2-1some.release+3hashes .\database.nuspec produces a file called Database.1.0.2-1some.release.nupkg.

The meta data is not included in the filename nor is in the nuspec file embedded in the package.

Pack Bug

Most helpful comment

File name: no metadata
Nuspec: includes metadata

All 5 comments

I was able to repro this. Putting the full version into the nuspec and packing works, but passing the version from the command line drops the metadata.

The code that copies this over may need to use _NuGetVersion.ToFullString()_ instead of _NuGetVersion.ToString()_ which defaults to leaving metadata out.

By the way the wiki mentions that the metadata is being dropped on purpose. Someone should correct that as the bug is being fixed. https://github.com/NuGet/Home/wiki/SemVer-2.0.0-support#pack.

File name: no metadata
Nuspec: includes metadata

Cool, Thanks for clarifying that.

this has been fixed in our dev branch.

Was this page helpful?
0 / 5 - 0 ratings