Download code example
I had searched a lot to make files zip using c#, all the solution provided only support to zip a single file but my requirement is to zip a directory selected by used, I had tried so many utilities but unfortunately all does not works for me.
Finally I found a solution which is using Java utility to zip file. This solution is quite easy to implement and debug.
To implement this solution you need to add reference of “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vjslib.dll” to your application.
I had searched a lot to make files zip using c#, all the solution provided only support to zip a single file but my requirement is to zip a directory selected by used, I had tried so many utilities but unfortunately all does not works for me.
Finally I found a solution which is using Java utility to zip file. This solution is quite easy to implement and debug.
To implement this solution you need to add reference of “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vjslib.dll” to your application.