0

I can't get to use GZipStream class in my C# ASP.NET 4.5 application.

I get the error:

The type or namespace name 'GZipStream' could not be found (are you missing a using directive or an assembly reference?)

I tried using using System.IO; but the System.IO.Compression is not available in the "Reference Manager" in visual studio. I right click on the object name to see if Visual Studio finds the relevant reference but it does not.

Any suggestions?

crthompson
  • 15,653
  • 6
  • 58
  • 80
Liron Harel
  • 10,819
  • 26
  • 118
  • 217

2 Answers2

5

Need to add reference to System.dll assembly and using System.IO.Compression namespace.

MSDN: GZipStream Class

Artem Mesha
  • 157
  • 5
0

The namespace is not the same as the dll name,You need to add a dll reference to the assembly, System.IO.Compression.FileSystem.dll

Cris
  • 12,799
  • 5
  • 35
  • 50