You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a nuget package where there are lots of spaces in file and folder names. We experience two different levels of inconsistency related to this repository:
The replacement of space with %20 is not consistent, leading the content of folders being split in the generated package. In itself this is cosmetical, at least when using paket to also install it, since the reversion of spaces will put them together again in an unpacked folder.
However, the restoring is also not consistent. This sometimes lead to a situation where a folder created to hold a file get one name while the folder it just afterwards tries to put the file get another name, causing a "Directory not found" exception. Tracking down this situation has been rather awkward! It seems to be related to space not always being replaced with %20, but with something more complex.
Repro steps
Due to the inconsitency (and apparent arbitrariness) it might take some effort to reproduce.
You need
a. A project with files and folders with spaces in the names. Use paket to generate a nuget package of this project.
b. A project that depends on this package (in its paket.dependencies).
Build project b).
Expected behavior
On building project b) the package from a) is fetched and unpacked.
Actual behavior
On building project b) the package from a) is fetched and unpacked. During unpacking there will be an exception indicating "Directory not found" or similar.
Known workarounds
Use nuget pack instead.
With nuget there is no space conversion at all, spaces go straight through and everything works.
Related information
Windows 10.
The description is based on version 3.1.9.
.NET Runtime 4.6
The exception gives a fair hint into failing code, which has enabled med to set breakpoints and watch variables. Is is all in method NugetV2.cleanup where I can follow the inconsistent and somewhat strange input and how Uri.UnescapeDatastring does not produce the expected result. The eventual exception comes from File.Move in the same method, but looking at variables during debugging might provide enough clues even if you are not able to make it actually crash.
The text was updated successfully, but these errors were encountered:
Looking at the content of the generated nupkg actually reveals one side of the problem. Spaces in file and folder names have all been replaced. The idea is to reverse this on unpacking and it is here it can go wrong since the space-replacing is inconsistent.
Description
We have a nuget package where there are lots of spaces in file and folder names. We experience two different levels of inconsistency related to this repository:
Repro steps
Due to the inconsitency (and apparent arbitrariness) it might take some effort to reproduce.
You need
a. A project with files and folders with spaces in the names. Use paket to generate a nuget package of this project.
b. A project that depends on this package (in its paket.dependencies).
Build project b).
Expected behavior
On building project b) the package from a) is fetched and unpacked.
Actual behavior
On building project b) the package from a) is fetched and unpacked. During unpacking there will be an exception indicating "Directory not found" or similar.
Known workarounds
Use nuget pack instead.
With nuget there is no space conversion at all, spaces go straight through and everything works.
Related information
The exception gives a fair hint into failing code, which has enabled med to set breakpoints and watch variables. Is is all in method NugetV2.cleanup where I can follow the inconsistent and somewhat strange input and how Uri.UnescapeDatastring does not produce the expected result. The eventual exception comes from File.Move in the same method, but looking at variables during debugging might provide enough clues even if you are not able to make it actually crash.
The text was updated successfully, but these errors were encountered: