Tag: password protection

在Mac上的C#上使用DotNetZip压缩文件

我试图在使用DotNetZip的mac上使用以下代码片段在C#中压缩文件或目录。 但是下面我有一些例外,我做错了什么? using Ionic.Zip; namespace CSLab { class Program { static void Main(string[] args) { using (ZipFile zip = new ZipFile()) { zip.Password = “password”; zip.AddDirectory(“./test”); zip.Save(“a.zip”); } } } } Unhandled Exception: System.ArgumentException: ‘IBM437’ is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. […]