Search code examples
c#unzip

Can't find ExtractToDirectory in c#


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?


Solution

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

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