-
Notifications
You must be signed in to change notification settings - Fork 253
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
Packages can't be retrieved from restored packages folders due to unexpected letter casing in nuspec file #13099
Comments
@bhaeussermann are you able to debug the code to figure out what's going on? If so, we'd accept a pull request if its an easy fix. |
@jeffkl As far as I can tell the issue lies with the .nuspec file being generated with a different letter casing than what is expected when loading the packages. It is quite odd that when restoring from the Docker container the file is written as NuGet.Commands.nuspec, but when restoring from the Windows host it is written as nuget.commands.nuspec and there's no issue. I found an effective work-around is to rename all .nuspec files to lower case after restoring the packages. I'm not sure where to look at the code to troubleshoot. Can you tell me where in the code it is generating that .nuspec file? |
You're setting: |
I'll close this, but let us know if you're still having problems after removing that. |
NuGet Product Used
NuGet SDK
Product Version
NuGet.Commands package version 6.8.0
Worked before?
No response
Impact
It's more difficult to complete my work
Repro Steps & Context
I need to restore NuGet packages to folders via a Linux Docker container (of a Docker image
nuget-restore
) and include these folders in a second Docker imagenuget-get-packages
in order to load the packages from within a container of this image.However, the casing of the restored nuspec file differs from what is expected by the
LocalFolderUtility.GetPackagesV3()
method and so the package is not loaded by that method.When I perform either the package restore or get-packages operation directly on my Windows PC then getting the packages from the folders works fine (presumably due to file paths being case-insensitive in Windows). Therefore, the minimal reproduction of this issue for me is to perform both operations via Docker containers (I have Docker Desktop installed which is set to use Linux containers).
Here's my program for the first Docker image
nuget-restore
:Here's the Dockerfile for creating the image
nuget-restore
:Build the image:
Run the image, binding the packages folder to a folder on the host:
Here's my program for getting the packages from the restored folders:
Here's the Dockerfile for creating the image
nuget-get-packages
. Note the step that copies the restored packages folder into the image.Move the restored packages folder into the folder of the project and build the image:
Run the image:
The program output is:
Looking at the log-output, there are many logs like:
Looking at the restored packages folders I note that the relevant file name isn't nuget.commands.nuspec but NuGet.Commands.nuspec and this is clearly the reason the nuspec file isn't found and getting the packages fails.
Verbose Logs
No response
The text was updated successfully, but these errors were encountered: