Murray Brown
asked on
VB.net Issue trying to unzip folder
Hi
I am trying to unzip a folder using the code example below
I am pretty sure that I have .NET 4.5 installed on my machine
but it still doesn't recognize ZipFile
I tried to add a reference to Imports System.IO.Compression
but can't find it.
I can see it in the bottom box in the attached image
Not sure what to do
Imports System.IO
Imports System.IO.Compression
Module Module1
Sub Main()
Dim startPath As String = "c:\example\start"
Dim zipPath As String = "c:\example\result.zip"
Dim extractPath As String = "c:\example\extract"
ZipFile.CreateFromDirector y(startPat h, zipPath)
ZipFile.ExtractToDirectory (zipPath, extractPath)
End Sub
End Module
I am trying to unzip a folder using the code example below
I am pretty sure that I have .NET 4.5 installed on my machine
but it still doesn't recognize ZipFile
I tried to add a reference to Imports System.IO.Compression
but can't find it.
I can see it in the bottom box in the attached image
Not sure what to do
Imports System.IO
Imports System.IO.Compression
Module Module1
Sub Main()
Dim startPath As String = "c:\example\start"
Dim zipPath As String = "c:\example\result.zip"
Dim extractPath As String = "c:\example\extract"
ZipFile.CreateFromDirector
ZipFile.ExtractToDirectory
End Sub
End Module
try to Add a reference to this assembly: System.IO.Compression.File System
Hi,
Add the Reference to System.IO.Compression.File System
1. Right click on the References
2. Add References
3. Select System.IO.Compression.File System
4 Click Ok
Add the Reference to System.IO.Compression.File
1. Right click on the References
2. Add References
3. Select System.IO.Compression.File
4 Click Ok
ASKER
As I said in my question " I tried to add a reference to Imports System.IO.Compression
but can't find it."
What could cause this?
but can't find it."
What could cause this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great answer. As always! Thanks
Not a problem murbro, glad to help.