-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cannot install globally a .NET tool on Linux when the version contains uppercase #39105
Comments
I looked into this, and I think the problem is just because PackageId's ToString method always calls ToLowerInvariant. I tried to see why, and the commit looked like it was just a repo merge commit, not a real commit. Do you know why we're calling ToLowerInvariant here? Can we just remove that? |
Place with ToLowerInvariant:
|
Triage: Per Daniel's understanding, NuGet treats package IDs as all lowercase (CC @nkolev92 ) so there is likely a different path where we didn't lowercase it. |
Follow-up: Per the semver spec the ID is lowercase but the version (prerelease part) is case sensitive so probably somewhere we're treating it as lowercase when we shouldn't be. |
Do you refer to some NuGet-only spec? https://semver.org doesn't seem to mention IDs.
NuGet package version is documented to deviate from semver by being case-insensitive: https://github.com/NuGet/docs.microsoft.com-nuget/blob/070022ca55eee4f855088a684254f132c0ba386d/docs/concepts/Package-Versioning.md?plain=1#L269 |
This makes me wonder if there are similar problems with other package version normalisation that NuGet does, e.g. a tool with version 1.0.0.0 being normalised to 1.0.0. |
Describe the bug
Cannot install globally a .NET tool on Linux when the version contains an uppercase character
To Reproduce
Be sure to run
dotnet tool update
on Linux or a case-sensitive file-systemExceptions (if any)
Further technical details
Was originally opened on NuGet/Home: NuGet/Home#13275
The text was updated successfully, but these errors were encountered: