问题
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?
回答1:
Need to add reference to System.dll
assembly and using System.IO.Compression
namespace.
MSDN: GZipStream Class
回答2:
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
来源:https://stackoverflow.com/questions/21042535/gzipstream-could-not-be-found-reference-issue