豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Make package ID and version comparison case insensitive #2522

@joelverhagen

Description

@joelverhagen

The server already does this and version comparison in memory is case insensitive. We've also done a pretty good job about making ID comparison in memory a case insensitive operation.

However, there are places where ID comparisons are case sensitive. Namely, code that interacts with the file system. For example, when a local source is a directory of .nupkgs, the ID comparisons are case sensitive.

The plan forward here is:

  • Add a property to the project.lock.json file so that each package libraries (under the libraries node) has a path. The value of this property should be {id}/{version} component of a path which can be used along with the global packages folder to get the absolute path to package assets.
  • Add a switch to NuGet to support restoring the original ID and version format. This is for backwards compatibility (with Add --legacy-packages-directory to Xplat restore NuGet.Client#814).
  • Update the .NET CLI to write this property to the .deps.json file.
  • Update the .NET CLI to write "hashPath" to the .deps.json file.
  • Update the DotNetHost to prefer the path property over the concatenation of ID and version when reading the .deps.json file and use the "hashPath" property when available.
  • Revert the hack which always lowercases the package ID and version in the .deps.json file.
  • Work with owners of DOTNET_HOSTING_OPTIMIZATION_CACHE to ensure the new cache is built with the proper format.

Metadata

Metadata

Assignees

Labels

Type:DCRDesign Change Request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions