NuGet does not allow building packages with a special version in the semver that exceeds 20 characters. There's no reason for the check to exist since semver has no length restrictions.
Code to delete:
I concur. This was a little troublesome in my team's project as we used the following prerelease string
1.0.0-ci-yyyyMMdd-hhmmss which does not leave a lot of room for detail beyond the build time/string. To separate between locally built packages and build machine packages we ended up with 1.0.0-my-yyyyMMdd-hhmmss which is less nice than say 1.0.0-%USER%-yyyyMMdd-hhmmss or similar.
It could be useful to stamp in the branch name, build configuration, build source (local user vs build machine), or other information as well. 20 characters seems a bit too small and it would be nice to expand this.
The special label length has been removed. Servers such as nuget.org may still enforce this limit, but this opens up the opportunity for users to begin creating packages with longer labels for development purposes.
The decision to remove the limit was done based on the recent Windows 10 feature that now allows users to opt in to removing the max path length.
Package authors should still take care when creating packages to make sure that other users consuming the packages will not hit max path issues.
Could someone tell me which version of NuGet this was removed in please?
@jez9999 4.0.0
Most helpful comment
The special label length has been removed. Servers such as nuget.org may still enforce this limit, but this opens up the opportunity for users to begin creating packages with longer labels for development purposes.
The decision to remove the limit was done based on the recent Windows 10 feature that now allows users to opt in to removing the max path length.
Package authors should still take care when creating packages to make sure that other users consuming the packages will not hit max path issues.