Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.IO.Compression.FileSystem.dll in c# program

Tags:

c#

.net

file

dll

I' like to use the dll System.IO.Compression.FileSystem.dll in my project

file

the .net framework version is 4.5 and the os is 64. The problem is that the dll is not found. config What is the solution?

like image 510
Lamloumi Afif Avatar asked May 31 '13 15:05

Lamloumi Afif


1 Answers

The namespace is not the same as the dll name (assembly name). from the MSDN page you linked

Namespace: System.IO.Compression
Assembly: System.IO.Compression.FileSystem (in System.IO.Compression.FileSystem.dll)

So the namespace you need to include is System.IO.Compression not System.IO.Compression.FileSystem. Take off the FileSystem part from your using statement and it will solve your problem.


If people are down-voting me because the OP said "The problem is that the dll is not found." I think the OP is not using the correct word choice, if the problem really was that the DLL could not be found there would be a exclamation point by the assembly name which the original screenshot does not have

See the original image below

Original Image
(click for larger view)

Compare that to my screenshot I created that would show up if the DLL really was not found, note the exclamation point I have that the original screenshot does not.

enter image description here

like image 104
Scott Chamberlain Avatar answered Nov 09 '22 04:11

Scott Chamberlain