dotnet / NuGet.BuildTasks

The build tasks used to pick up package content from project.lock.json.
MIT License
45 stars 61 forks source link

Fix finding packages in lower-case dirs on case-sensitive .. #36

Closed radical closed 4 years ago

radical commented 7 years ago

.. filesystems.

NuGet now restores packages in lower case directory names, but the build task ResolveNuGetPackageAssets constructs the path from package name and version, like:

Microsoft.NETCore.Portable.Compatibility/1.0.1

.. instead of

microsoft.netcore.portable.compatibility/1.0.1

This breaks builds on msbuild/mono on case-sensitive filesystems, eg. on Linux.

The actual on-disk path is available in the lock/assets.json file as:

"libraries": {
"Newtonsoft.Json/10.0.2": {
...
"path": "newtonsoft.json/10.0.2",
...

So, we use that to look for the package. But fallback to the old method if this "path" is not available.

Cherry-picked 112685a925e5c0d26fcf9c9006341d4fa4f66515 from dev15.1 .

dmonroym commented 4 years ago

We've moved things around this repo. Please reopen this PR against master if you want us to take a look at this again.