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.CreateFromDirectory(startPath, zipPath)

        ZipFile.ExtractToDirectory(zipPath, extractPath)
    End Sub

End Module

1
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kamal KhaleefaInformation Security SpecialistCommented:
try to Add a reference to this assembly: System.IO.Compression.FileSystem
0
Lokesh B RDeveloperCommented:
Hi,

Add the Reference to System.IO.Compression.FileSystem

1. Right click on the References
2. Add References
3. Select System.IO.Compression.FileSystem
4 Click Ok
0
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
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?
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Fernando SotoRetiredCommented:
Hi murbro;

Having .Net Framework 4.5 on your system does not mean that your project is being compiled with .Net 4.5. You may have multiple .Net Framework's installed but is your project being compiled under 4.5? To see if your project is being compiled with .Net Framework 4.5 or higher as required for ZipFile class go to the projects property page and you should see it on the Application Tab, Note my .Net project is set for 4.0 which does not have ZipFile class but if I set it to 4.5 I then have access to ZipFile class.

Property page
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Great answer. As always! Thanks
0
Fernando SotoRetiredCommented:
Not a problem murbro, glad to help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.