Visual Basic .NET Language Adding File Compression to your project


Example

  1. In Solution Explorer go to your project, right click on References then Add reference…
  2. Search for Compression and select System.IO.Compression.FileSystem then press OK.
  3. Add Imports System.IO.Compression to the top of your code file (before any class or module, with the other Imports statements).
Option Explicit On
Option Strict On

Imports System.IO.Compression

Public Class Foo

    ...

End Class

Plese note that this class (ZipArchive) is only available from .NET verison 4.5 onwards