2014-01-10 31 views
0

我无法在我的C#ASP.NET 4.5应用程序中使用GZipStream类。'GZipStream'找不到 - 参考问题

我得到的错误:

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

我试着用using System.IO;System.IO.Compression不可在Visual Studio中的“参考文献管理器”。我右键单击对象名称以查看Visual Studio是否找到相关的引用,但它没有。

有什么建议吗?

+1

这不是在'System.IO.Compression.dll'(它是ZIP档案),'GZipStream'但在'System.dll'组装。使用System.IO.Compression添加''。 –

+0

添加你的答案,我会接受 –

+1

你可以接受Ozik的答案,或多或少相同的内容。 –

回答

3

需要补充参考System.dll组装和using System.IO.Compression命名空间。

MSDN:GZipStream Class

+0

对,但我想他已经有了System.dll的引用! :) –

0

命名空间是不一样的DLL名称,你需要一个DLL引用添加到组装,System.IO.Compression.FileSystem.dll

+1

不,System.IO.Compression.FileSystem程序集是用于ZipFile而不是用于_simple_ gzip流(它只是在System.dll中) –