Is the Visual Studio template file just a regular .zip file or is it something else?
Asked Answered
B

3

8

I'm trying to tweak a project template file exported by Visual Studio's "Export Template" wizard. At first glance this looks like just a garden-variety zip file, but it's not:

  1. I can't edit files. If I try to change or delete or replace a file in the zip archive, I get The Compressed (zipped) Folder is invalid or corrupted.
  2. If I uncompress and recompress the zip file, Visual Studio no longer recognizes it as a template.

Is this something specific to my setup, or is there something non-standard about the zip format used by Visual Studio templates?


Edit I tried again and actually #2 above isn't true - I can un-zip, edit, and re-zip and VS sees the template. Still stumped as to why I couldn't manipulate the original archive directly, but I'm moving on.

Brine answered 10/3, 2010 at 17:7 Comment(6)
Try using 7-Zip. It's a free alternative.Glottology
Nope, it's a plain ZIP archive. Your zip tool sounds borked.Barabarabarabas
I've tried both the built-in Windows zip tool and 7-Zip, on two different machines. They both fail.Brine
FWIW I've tried this with templates based on a nearly empty project, so it's not anything peculiar about the project itself.Brine
I too am having the exact symptoms of #2, I have tried standard windows "Send to Zip file" and 7-zip, neither is working.Anatto
look below at JoJo's answer, this is the real issue and solution as to why VS no longer recognizes the file after editing. I wish i would have read it hours ago...Anatto
O
4

Visual Studio templates use the standard ZIP`ing format. I've succesfully compressed and uncompressed these files many times in the past.

What ZIP tool are you using?

Ohaus answered 10/3, 2010 at 17:11 Comment(3)
I've tried both the built-in Windows zip tool and 7-Zip, on two different machines. They both fail.Brine
The built in windows zip tool has some incompatibilities. I have tried zipping things with ziplib and unzipping them with windows zip and it fails. But winzip will unzip it - not sure where the problem liesTaunyataupe
For others with this issue, see Jojo Lechelt's answer below if the accepted answer does not help.Tutto
S
7

Solution is here to find: Exported Project Template from VS2008 but it is corrupted? In short: don't zip the directory, go into the directory, select all files and zip them into an archive.

Spandau answered 9/2, 2012 at 12:38 Comment(1)
dang, i came here specifically to say exactly this answer! This is the true solution!Anatto
O
4

Visual Studio templates use the standard ZIP`ing format. I've succesfully compressed and uncompressed these files many times in the past.

What ZIP tool are you using?

Ohaus answered 10/3, 2010 at 17:11 Comment(3)
I've tried both the built-in Windows zip tool and 7-Zip, on two different machines. They both fail.Brine
The built in windows zip tool has some incompatibilities. I have tried zipping things with ziplib and unzipping them with windows zip and it fails. But winzip will unzip it - not sure where the problem liesTaunyataupe
For others with this issue, see Jojo Lechelt's answer below if the accepted answer does not help.Tutto
T
1

I have used Winzip in the past to unzip a template, make changes, then rezip and VS read it and recognized the changes. This was VS2005 and VS2008

Taunyataupe answered 10/3, 2010 at 17:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.