Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nuget encodes the blank spaces in names of files

I created a nuget package using the pack command:

http://docs.nuget.org/docs/reference/command-line-reference#Pack_Command

everything works fine; the only issue that I have is related to the fact that I'm trying to install a certificate through a powershell script. The name of this certificate is something like "CompanyName Ltd.pfx" (note the blank space) but in the nuget package it is encoded as "CompanyName%20Ltd.pfx" and therefore my installation script fails for this certificate. Now, this is a minor issue as I can modify the certificate name removing the blank space, but anyway I'm wondering if there is a method that prevents (or controls) this type of encoding (as I haven't found anything in the nuget documentation).

like image 293
g.cacciapaglia Avatar asked Nov 06 '13 11:11

g.cacciapaglia


People also ask

What is a NuGet file?

Put simply, a NuGet package is a single ZIP file with the . nupkg extension that contains compiled code (DLLs), other files related to that code, and a descriptive manifest that includes information like the package's version number.

Where are NuGet files stored?

The default is %userprofile%\. nuget\packages (Windows) or ~/. nuget/packages (Mac/Linux). A relative path can be used in project-specific nuget.

How do I create a NuGet config file?

The NuGet Visual Studio extension, the NuGet Package Manager Console, and the NuGet command-line tool all make use of the NuGet configuration file, which by default is located under %AppData%\NuGet\NuGet. config.

What does clear all NuGet caches do?

The above process will clear all the NuGet packages from cache location. So once cleared the NuGet cache location then every NuGet package will be downloaded/restored from source location to cache location again.


1 Answers

I had the exact same problem. Unzipping the file does seem to encode the file names no matter what utility you use.

I solved this by opening the .nupkg in the NuGet Package Explorer and using Export from the File-menu.

like image 94
Reyhn Avatar answered Nov 13 '22 02:11

Reyhn