如何在.NET 3.5中使用DotNetZip提取zip文件?

问题描述 投票:0回答:1

我在visual studio中有一个C#项目,我想将目标框架从.NET Framework 4.6更改为.NET Framework 3.5。在过去,我使用此代码来解压缩zip文件:

ZipFile.ExtractToDirectory(zipPath, extractPath);

但是现在我不能使用ZipFile类了。所以我在我的项目中添加了DotNetZip库,但我不知道如何使用它。

c# .net unzip
1个回答
0
投票

正如史蒂夫在评论中所说,我使用了this link

using (ZipFile zip = ZipFile.Read(zipPath))
{

    zip.ExtractAll(mainPath);

}
© www.soinside.com 2019 - 2024. All rights reserved.