-
Notifications
You must be signed in to change notification settings - Fork 252
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 defaults to version 1.0.0 when AssemblyInformationalVersion metadata contains forward slash #4082
Comments
Please try nuget.exe 4.3 from https://www.nuget.org/downloads, if it still repro, feel free to reopen it |
I have the same problem with the last recommended version (4.6.2) |
It's also in VS 15.7.2 Note: Without GeneratePackageOnBuild, pack context menu command seems do nothing. With |
can you try setting [assembly: System.Reflection.AssemblyInformationalVersionAttribute("0.4.1-beta.1+3.Branch.hotfix/0.4.1.Sha.425411544773065ae3f26134ecc2f977953efe39")] as you are currently doing in csproj, and also set PackageVersion in csproj to the same value (instead of setting version) ? |
@dasMulli That would explain case 1. @rohit21agrawal Same result as case 2 |
@cortex93 markdown swallowed my
|
|
@cortex93 this is because your version string is invalid as per semver2.0 requirements:
Source: https://semver.org/ You need to remove |
@rohit21agrawal. Ok. I close this issue. When fixed, the related one should lead to better consistency in error message when building without PackageVersion. |
Details about Problem
When AssemblyInformationalVersion is a SemVer2 value where BuildMetadata segment contains a forward slash, nuget pack do not resolve version from AssemblyInformationalVersion attribute and use 1.0.0 as a default version number, also skipping other version attributes with valid version.
Same behavior when resolving version of dependent projects (IncludeReferencedProjects )
NuGet product used (NuGet.exe):
NuGet version (3.5.0-rtm-1996, 3.6.0-rc-2004):
OS version (i.e. win2016 build 14393):
Worked before? If so, with which NuGet version:
I think no
Detailed repro steps so we can see the same problem
The text was updated successfully, but these errors were encountered: