how to avoid [Content_Types].xml in .net's ZipPackage class

前端 未结 6 959
星月不相逢
星月不相逢 2021-01-07 19:09

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

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-07 19:45

    No.

    Zip Packages are not (normal) Zip files. They must follow an imposed structure and contain that Content_Types.xml file in the root. ZipPackage = ZipArchive + Structure.

    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

提交回复
热议问题