Add a reference to System.IO.Compression.FileSystem assembly if you already know how.
Also add this line to the beginning of your file:
using System.IO.Compression;
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I want to extract a zip file in a specific location to another location: The code is below: But it says "ZipFile does not exist in the current context" in the 4th line of code. Please help! Please provide an correct code that can extract zip files!
string zipPath = @"C:\Users\bnara\Documents\text.zip";
string extractionPath = @"C:\Users\bnara\Pictures\text.zip";
ZipFile.ExtractToDirectory(zipPath, extractionPath);
MessageBox.Show("Extracted Successfully");
Add a reference to System.IO.Compression.FileSystem assembly if you already know how.
Also add this line to the beginning of your file:
using System.IO.Compression;