Frage

I'm trying to build an example from GZipStream Class. With the command gmcs gzip.cs, I got error messages. gzip.cs is the same source from the msdn.

It seems that I need to add reference when compiling. What's missing?

gzip.cs(57,32): error CS1061: Type `System.IO.FileStream' does not contain a definition for `CopyTo' and no extension method `CopyTo' of type `System.IO.FileStream' could be found (are you missing a using directive or an assembly reference?)
/Library/Frameworks/Mono.framework/Versions/2.10.1/lib/mono/2.0/mscorlib.dll (Location of the symbol related to previous error)
gzip.cs(86,40): error CS1061: Type `System.IO.Compression.GZipStream' does not contain a definition for `CopyTo' and no extension method `CopyTo' of type `System.IO.Compression.GZipStream' could be found (are you missing a using directive or an assembly reference?)
/Library/Frameworks/Mono.framework/Versions/2.10.1/lib/mono/gac/System/2.0.0.0__b77a5c561934e089/System.dll (Location of the symbol related to previous error)
Compilation failed: 2 error(s), 0 warnings

SOLVED

I should use 'dmcs', not 'gmcs' in order to use .NET 4 functions.

Keine korrekte Lösung

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top