-
Notifications
You must be signed in to change notification settings - Fork 258
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
Pack improperly encodes filenames #5726
Comments
Just saw this which is likely the fix: #2389 |
@phillijw Can you please try using a newer version of the exe? |
Our build server was happy with it using a newer version, yes. So that did work. I expected VS2017 to have a newer version with it although I might misunderstand how they are connected. |
Thanks for checking that @phillijw, Glad it's fixed! |
I tried nuget.exe v4.1.0 and v4.3.0, as well as older versions, and had a problem with filenames containing spaces: The [Content_Types].xml contained lines like If I remove all occurrences of "Override" having a "PartName" containing spaces, the package installs successfully. Note that this seems to occur only for binary files without a well-known file extension. |
Just a note for others who may run across this... This change makes NuGet generate packages that are incompatible with https://www.nuget.org/packages/NuGet.Core/ It uses System.IO.Packaging to read the package, which cannot even see files that have not been uri encoded. |
Details about Problem
NuGet product used: Package Manager Console
NuGet version (x.x.x.xxx): 2.8.50926.602
dotnet.exe --version (if appropriate): --
VS version (if appropriate): VS Enterprise 2017 (15.2)
OS version (i.e. win10 v1607 (14393.321)): win 7
Worked before? If so, with which NuGet version: Unsure
Detailed repro steps so we can see the same problem
Create a nuspec file
In the , include a file with spaces in the name (you may have to use a wildcard)
Generate nupkg by running nuget pack
Rename nupkg file to .zip and view. You will see %20 instead of spaces in filenames (same for commas and other special characters)
...
Other suggested things
Verbose Logs
As you can see, the filenames appear proper in the output but in the nupkg file itself they are transformed with special characters being URL encoded. When they get unpacked, they are not decoded.
The text was updated successfully, but these errors were encountered: