Extract Zip File skips file with no error

I’m trying to automate some of the steps related to customizing a Visual Studio Project Template.  As part of this, I’ve added an “Extract Zip” Action to a finalbuilder project, and pointed it to the zip file in My Documents\Visual Studio 2005\My Exported Templates.  I set the Output Dir to a folder beneath that.  After running the action, however, one file is missing.  In the cases I’ve tried, it’s always the project file.  I tried with the attached zip, and the file “RssToolkitSpike.csproj” is missing in the output folder.  If I extract it using windows explorer or WinRAR, the file appears.  I have tried with and without “Fail if files skipped”, and “Retain Attributes”.  The default “All Files” is selected, but if I specify the file mask “*.csproj”, no files are extracted.

This seems like it could be a bug in the Extract Zip action’s unzip code.
RssToolkitSpike.zip (13.224 KB)

An additional note.  I’m able to workaround this by using a free command line zip/unzip utility (InfoZip).  However in the output, I notice several error messages similar to this:

My Project/:  mismatching “local” filename (RssToolkitSpike.csproj),
         continuing with “central” filename version

I’m not at all familiar with the zip format, but this would lead me to believe the zip generated by Visual Studio is non-standard, but that it should still be possible to extract this file…

Hi Daniel,

hmmm, strange! I’ve reproduced the problem with that file you’ve sent… and I’ve just checked that we’re on the latest version of the component we use for unzipping. I’ll contact the vendors and hopefully they can sort it out.

Another option is to use the Extract Archive action (it’s based on 7-zip). It does extract the RssToolkitSpike.csproj file, but has problems with the Properties directory :frowning:
So - I’d recommend you stick with InfoZip in FinalBuilder (you can automate it via the Execute Program action, or writing your own action in ActionStudio).

.t8

Hi Daniel,

The vendor of the component has figured out the problem - basically it’s an invalid zip file. Question is though, how did you create the zip file from VisualStudio, and do all zip files created with VS have this problem? [I had a quick look to see how to do this in VS, but didn’t figure it out].

.t8

Yes, this was zipped from Visual Studio directly. To reproduce, in VS2005, create a project and go to File -> Export Template. This is the zip file generated by the project template wizard. In this case, it was a Web Application Project (only avail in VS2005 SP1). I’m not sure if the same problem applies to other project types, etc.

Hi Daniel,

Thanks for that - reproduced.

.t8

To provide some context, this is what we’re doing:
http://msdn.microsoft.com/msdnmag/issues/06/01/CodeTemplates/

Ideally, the entire process could be automated, but FinalBuilder has let me automate everything except the initial ‘Export’. It picks up the exported Zip, makes a few of the changes listed above to insert guidance, etc., zips it back up, copies it where I need it, and checks it into source control. I could definitely see others doing similar.

I did some more digging and found this similar bug report (unfortunately closed):
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=243500

Sounds like it is a technically invalid zip, but several other zip utilities handle it fine (InfoZip, WinRAR, WinXP built-in, ALZip), so it’s not unreasonable that another work with it.

Thanks.

I’ve put the fix of the component in the hands of the component developer - so hopefully we’ll get a fix.

It sounds like you’ve got a couple of workarounds (eg. InfoZip and WinRAR) for the time-being, which you’re probably using from an Execute Program action, right?

Yeah, my workaround is to use Execute Program action against Info-Zip UnZip, available here:
http://www.info-zip.org/

I’ve considered writing an Action for that, and still may, but it works for me now.

I still use the FinalBuilder Create Zip action to zip everything back up.