[Mono-list] System.IO.Compression

Robert Jordan robertj at gmx.net
Wed Jun 6 11:59:38 EDT 2007


Hi,

Ian Su wrote:
> Hi,
> 
> Somehow I'm having trouble getting GZipStream to work in mono.
> It's as if System.IO.Compression doesn't exist in mono at all? 
> 
> I do:
> 
> $ cat GZTest.cs 
> using System.IO.Compression;
> 
> class GZTest {
> }
> 
> $ mcs /target:library GZTest.cs
> GZTest.cs(1,7): error CS0234: The type or namespace name
> `Compression' does not exist in the namespace `System.IO'. Are
> you missing an assembly reference?
> GZTest.cs(1,1): error CS0246: The type or namespace name
> `IO.Compression' could not be found. Are you missing a using
> directive or an assembly reference?
> Compilation failed: 2 error(s), 0 warnings
> 
> $ mcs --version
> Mono C# compiler version 1.2.4.0
> 
> As far as I can tell google, other people are able to use
> System.IO.Compression in mono fine. Any ideas what I'm doing
> wrong?

Since System.IO.Compression is a .NET 2.0 feature, you have to
use "gmcs" instead.

Robert



More information about the Mono-list mailing list