Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuget pack doesn't support blank <version> in .nuspec even though version is passed on the command line #7987

Closed
samrueby opened this issue Apr 10, 2019 · 0 comments · Fixed by NuGet/NuGet.Client#6092
Assignees
Labels
Category:Quality Week Issues that should be considered for quality week Functionality:Pack Priority:2 Issues for the current backlog. Product:NuGet.exe NuGet.exe SeQuality Type:Bug

Comments

@samrueby
Copy link

samrueby commented Apr 10, 2019

Details about Problem

When running nuget pack with a .nuspec file that contains an empty version and passing -Version on the command line, nuget will fail with the error:

An error occured while trying to parse the value '' of property 'version' in the manifest file.
Value cannot be null or an empty string.
Parameter name: value

However, you put in a bogus version identifier in the nuspec file, the same command will run happily, with the version number passed on the command line.

NuGet product used: NuGet.exe

NuGet version (x.x.x.xxx): 4.9.3.5777

OS version (i.e. win10 v1607 (14393.321)): Win 10 1903

Detailed repro steps

  1. Create a valid .nuspec file, but with an empty version, i.e. <version></version>

  2. Run nuget.exe pack the.nuspec -Version 1.2.3.4

  3. See error.

  4. Replace version in .nuspec file with <version>0.0.0.0</version>

  5. Run same command as above

  6. See success.

@zivkan zivkan added Functionality:Pack Product:NuGet.exe NuGet.exe Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Type:Bug labels Apr 10, 2019
@zivkan zivkan added this to the Backlog milestone Apr 10, 2019
@ghost ghost added the Status:Inactive Icebox issues not updated for a specific long time label Sep 1, 2022
@nkolev92 nkolev92 added Priority:2 Issues for the current backlog. Category:Quality Week Issues that should be considered for quality week and removed Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Pipeline:Icebox Status:Inactive Icebox issues not updated for a specific long time Status:Excluded from icebox cleanup Triage:NeedsTriageDiscussion labels Aug 3, 2023
@nkolev92 nkolev92 removed this from the Backlog milestone Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Quality Week Issues that should be considered for quality week Functionality:Pack Priority:2 Issues for the current backlog. Product:NuGet.exe NuGet.exe SeQuality Type:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants