Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find ExtractToDirectory in c#

Tags:

c#

unzip

I am trying to extract a zip file in C#. I have included using System.IO.Compression; but when I enter System.IO.Compression. the only methods i see are CompressionLevel, CompressionMode, DeflateStream, and GzipStream. ZipFile.ExtractToDirectory is not available. Is it deprecated?

like image 802
Panos Avatar asked Feb 05 '23 17:02

Panos


1 Answers

Make sure you have a reference to System.IO.Compression.FileSystem.

Using VS2015 and creating a console app does not add this by default.

like image 161
Jon B Avatar answered Feb 07 '23 08:02

Jon B