nuget 对文件名中的空格进行编码 [英] nuget encodes the blank spaces in names of files

查看:72
本文介绍了nuget 对文件名中的空格进行编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 pack 命令创建了一个 nuget 包:

I created a nuget package using the pack command:

http://docs.nuget.org/docs/reference/命令行参考#Pack_Command

一切正常;我遇到的唯一问题与我试图通过 powershell 脚本安装证书这一事实有关.此证书的名称类似于CompanyName Ltd.pfx"(注意空格),但在 nuget 包中它被编码为CompanyName%20Ltd.pfx",因此我的安装脚本无法使用此证书.现在,这是一个小问题,因为我可以修改证书名称以删除空格,但无论如何我想知道是否有一种方法可以防止(或控制)这种类型的编码(因为我在nuget 文档).

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).

推荐答案

我遇到了完全相同的问题.无论您使用什么实用程序,解压缩文件似乎都会对文件名进行编码.

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

我通过在 NuGet Package Explorer 中打开 .nupkg 并使用 Export 来自文件菜单.

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

这篇关于nuget 对文件名中的空格进行编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆