Solved

Decompressing a Zip file

Posted on 2014-03-06
6
276 Views
Last Modified: 2014-03-06
I am trying to find a means to unzip files in code.  I can find any number of code samples that work for .Net 4.5 but none for 3.5.  I am looking for an example
0
Comment
Question by:Alyanto
  • 3
  • 3
6 Comments
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 39908889
Since the release of the .Net Framework 3.0, we are now able to handle .zip files.  Microsoft provides the System.IO.Packaging class but it is so deeply hidden that most of us missed it. Check http://emoreau.com/Entries/Articles/2008/08/Introducing-SystemIOPackaging.aspx
0
 
LVL 1

Author Comment

by:Alyanto
ID: 39909543
CreateFilenameFromUri on line 4 in your code sample is claiming not to be declared.  I do have IO.Packaging imported so that is not the source of the problem.  Any suggestions are welcome.  

I am using framework 3.5 and due to the business reluctance to upgrade that is unfortunately my limit at the moment.
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 39909705
as stated in "Setting the reference", add a reference to the “WindowBase”
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:Alyanto
ID: 39909749
WindowsBase has already been added which is why I was so surprised
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 39909787
Wait a minute. This method is a private one available in the downloadable demo.
0
 
LVL 1

Author Closing Comment

by:Alyanto
ID: 39909909
Massive cheesy grin here!  Many thanks Eric

/Aly
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now