Visual Basic .NET Language File/Folder Compression Adding File Compression to your project

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

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



Got any Visual Basic .NET Language Question?