You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nuget.exe pack doesn't allow a pre-release tag which begins with numbers #1743
But it doesn't. This is the output using the latest (v3.2.0) nuget.exe:
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
Attempting to build package from 'ClassLibrary1.csproj'.
Packing files from 'C:\Projects\ClassLibrary1\ClassLibrary1\bin\Debug'.
Using 'ClassLibrary1.nuspec' for metadata.
'1.0.0-123-foo' is not a valid version string.
Parameter name: version
From readying the semver specs, I think this should be allowed. From semver v1:
A pre-release version number MAY be denoted by appending an arbitrary string immediately following the patch version and a dash. The string MUST be comprised of only alphanumerics plus dash [0-9A-Za-z-]. Pre-release versions satisfy but have a lower precedence than the associated normal version. Precedence SHOULD be determined by lexicographic ASCII sort order. For instance: 1.0.0-alpha1 < 1.0.0-beta1 < 1.0.0-beta2 < 1.0.0-rc1 < 1.0.0.
And semver v2:
A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes. Pre-release versions have a lower precedence than the associated normal version. A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92.
Sounds like something we might fix, after cleaning several higher priority issues. If you think this is something you need earlier, we will gladly take a pull request.
I got the same issue, I think. In my AssemblyInfo.cs, I have AssemblyInformationalVersion("1.2.3-beta.1"). nuget pack project.csproj silently fails and picks up the AssemblyVersion instead. If I explicitly use -version 1.2.3-beta.1, nuget pack fails with '1.2.3-beta.1' is not a valid version string.
Using 1.2.3-beta in the attribute or on the -version parameter works.
I'm pretty sure I'm not violating SemVer 2.0.0, which @kevinkuszyk quoted above.
Any progress on this? (I might be able to help out, if help is needed.)
All right. So, we need SemVer 2 support. Do you know of any specific difficulties regarding this? If all that needs to be done is parsing/validation of the version string, then I guess it's pretty straightforward..?
Thanks @emgarten - I actually tried it last week and it seems to be working. I didn't want to close the issue in case it didn't make it into the RTM for any reason.
Activity
yishaigalatzer commentedon Nov 20, 2015
Sounds like something we might fix, after cleaning several higher priority issues. If you think this is something you need earlier, we will gladly take a pull request.
kevinkuszyk commentedon Nov 25, 2015
Thanks @yishaigalatzer. Can you re-open the issue? I will take a look at it when I get some time.
yishaigalatzer commentedon Nov 25, 2015
Sorry closed by accident
Lette commentedon Nov 26, 2015
I got the same issue, I think. In my
AssemblyInfo.cs, I haveAssemblyInformationalVersion("1.2.3-beta.1").nuget pack project.csprojsilently fails and picks up theAssemblyVersioninstead. If I explicitly use-version 1.2.3-beta.1,nuget packfails with'1.2.3-beta.1' is not a valid version string.Using
1.2.3-betain the attribute or on the-versionparameter works.I'm pretty sure I'm not violating SemVer 2.0.0, which @kevinkuszyk quoted above.
Any progress on this? (I might be able to help out, if help is needed.)
yishaigalatzer commentedon Nov 26, 2015
@Lette This new report seems unrelated. Note we only support semver1 at the moment so you need to use 1.0-beta0001 or something like that.
We of course will gladly take a fix for the item above.
Lette commentedon Nov 26, 2015
All right. So, we need SemVer 2 support. Do you know of any specific difficulties regarding this? If all that needs to be done is parsing/validation of the version string, then I guess it's pretty straightforward..?
yishaigalatzer commentedon Nov 26, 2015
It's a lot more complex, and we decided to put support for semver2 in the upcoming release on hold for now. We will get back to it at some point
Lette commentedon Nov 26, 2015
OK, but correcting the OPs problem with semver 1 is still doable, right?
yishaigalatzer commentedon Nov 26, 2015
What does op mean?
2 remaining items
yishaigalatzer commentedon Nov 26, 2015
Thanks Jeff, yes we would like to get it fixed
emgarten commentedon Aug 23, 2016
This should be fixed as of 3.5.0-rc1
http://dist.nuget.org/index.html
kevinkuszyk commentedon Aug 23, 2016
Thanks @emgarten - I actually tried it last week and it seems to be working. I didn't want to close the issue in case it didn't make it into the RTM for any reason.
emgarten commentedon Aug 23, 2016
@kevinkuszyk thanks for verifying! I'll close it.