tags:

views:

37

answers:

1

I wish to know if there is any way to avoid to have a [Content_Types].xml file inside the zip file while using .net's ZipPackage class.

+1  A: 

No.

Zip Packages are not (normal) Zip files. If you want to create (and especially if you want to read) normal Zip archives you will need an extra library, there is no support in the BCL.

See SharpZipLib (GPL) and DotNetZip

Henk Holterman
@Henk: What do you mean by "normal" ? Is it not possible to create a ".zip" file using whatever is there inside .net framework ?
Kushal Waikar
@Kushal: Package = Zip Archive + Structure. So you can read a Zip Package with WinZip, but you cannot read (all) Zip files with ZipPackage
Henk Holterman
@Henk: I just wish to zip a single file. But I am not able to get rid of .xml file which gets embedded with the package.
Kushal Waikar
The contents.xml is what makes it a package.
Henk Holterman
@Henk: Yeps as you said "Package = Zip Archive + Structure"..
Kushal Waikar