Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using .Net framework 4.0, System.IO.Compression is only supported in 4.5. So I refered it from the 4.5 folder and it worked in my 4.0 application. Now the issue is that after publishing, I am not getting the dll(System.IO.Compression)in the Bin folder, So i am getting dll missing error after hosting. Hosted iis supports 4.0 only.
Posted
Updated 11-Oct-18 19:41pm
v4
Comments
syed shanu 23-Dec-14 23:45pm    
Did you add System.IO.Compression dll to your bin folder where you have hosted.
DamithSL 23-Dec-14 23:48pm    
System.IO.Compression[^] is avalable on .net 4.0
can you update the question with your code?
id-athul 24-Dec-14 0:07am    
Yes I have done it

1 solution

You should not do such things. The namespace "System.IO.Compression" is used by several DLLs all put in the GAC. You should always reference those DLLs by strong names, not by their executable modules. Please see:
http://en.wikipedia.org/wiki/Global_Assembly_Cache[^],
http://msdn.microsoft.com/en-us/library/yf1d93sz%28v=vs.110%29.aspx[^],
http://en.wikipedia.org/wiki/Strong_name[^],
http://msdn.microsoft.com/en-us/library/wd40t7ad%28v=vs.110%29.aspx[^].

—SA
 
Share this answer
 
Comments
id-athul 24-Dec-14 5:12am    
Please tell me how can I create a strong name for an exixting dll. What I did is created a new project hen referred System.IO.Compression. Then added a key and rebuild again. Now can I used this dll to refer. Or please tell me where we can get the strong name of System.IO.Compression.
Sergey Alexandrovich Kryukov 24-Dec-14 10:27am    
This is done by signing of the assembly, see the properties. But this is not the point.
You need to reference .NET FCL libraries by strong name. In the window "Add Reference", don't use "Browse", use .NET tab, where all GAC names will be shown. If you want to reference your own assembly, the by far beneficial way is to put all your projects with all dependencies in the same solution and reference by the tab "Projects". This way, if you change something in one of the projects, references will be preserved.
—SA
id-athul 24-Dec-14 6:02am    
My public token key is
b77a5c561934e089.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900