{"action":"reopened","issue":{"url":"https://api.github.com/repos/NuGet/Home/issues/1381","labels_url":"https://api.github.com/repos/NuGet/Home/issues/1381/labels{/name}","comments_url":"https://api.github.com/repos/NuGet/Home/issues/1381/comments","events_url":"https://api.github.com/repos/NuGet/Home/issues/1381/events","html_url":"https://github.com/NuGet/Home/issues/1381","id":106237550,"number":1381,"title":"NuGet fails to decompress NuGet packages, which are created with a newer ZIP version","user":{"login":"magicmonty","id":315639,"avatar_url":"https://avatars.githubusercontent.com/u/315639?v=3","gravatar_id":"","url":"https://api.github.com/users/magicmonty","html_url":"https://github.com/magicmonty","followers_url":"https://api.github.com/users/magicmonty/followers","following_url":"https://api.github.com/users/magicmonty/following{/other_user}","gists_url":"https://api.github.com/users/magicmonty/gists{/gist_id}","starred_url":"https://api.github.com/users/magicmonty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magicmonty/subscriptions","organizations_url":"https://api.github.com/users/magicmonty/orgs","repos_url":"https://api.github.com/users/magicmonty/repos","events_url":"https://api.github.com/users/magicmonty/events{/privacy}","received_events_url":"https://api.github.com/users/magicmonty/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NuGet/Home/labels/Priority:2","name":"Priority:2","color":"fbca04"},{"url":"https://api.github.com/repos/NuGet/Home/labels/Type:DCR","name":"Type:DCR","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/NuGet/Home/milestones/12","html_url":"https://github.com/NuGet/Home/milestones/Client-VNext","labels_url":"https://api.github.com/repos/NuGet/Home/milestones/12/labels","id":1107554,"number":12,"title":"Client-VNext","description":"This is the place of the issues we intend to consider in one of the future versions.\r\n\r\nPlacing an issue here does not mean we intend to act on it, it means it looks promising enough to have a deeper dive into it, or that we don't have it planned for the current or one of the planned future releases.","creator":{"login":"yishaigalatzer","id":1238711,"avatar_url":"https://avatars.githubusercontent.com/u/1238711?v=3","gravatar_id":"","url":"https://api.github.com/users/yishaigalatzer","html_url":"https://github.com/yishaigalatzer","followers_url":"https://api.github.com/users/yishaigalatzer/followers","following_url":"https://api.github.com/users/yishaigalatzer/following{/other_user}","gists_url":"https://api.github.com/users/yishaigalatzer/gists{/gist_id}","starred_url":"https://api.github.com/users/yishaigalatzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yishaigalatzer/subscriptions","organizations_url":"https://api.github.com/users/yishaigalatzer/orgs","repos_url":"https://api.github.com/users/yishaigalatzer/repos","events_url":"https://api.github.com/users/yishaigalatzer/events{/privacy}","received_events_url":"https://api.github.com/users/yishaigalatzer/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":1,"state":"open","created_at":"2015-05-12T21:08:40Z","updated_at":"2015-09-16T16:28:25Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-09-13T20:19:17Z","updated_at":"2015-09-16T16:28:25Z","closed_at":null,"body":"## Background\r\n\r\nI use [Paket](https://github.com/fsprojects/Paket) to create my packages. Paket uses the `System.IO.Compression.ZipArchive` class to create NuGet packages. This works fine under Windows. But if I create my package under Mono, I get a (valid) Archive with a \"Version needed to extract\" (Bytes 5 and 6) of `0x003F` (Zip Version 6.3) instead of `0x0014` (Zip Version 6.3), which is created by the Windows version. This is because the implementation in Mono is newer and writes this Version hard coded into the header.\r\n\r\n## The Problem\r\nNuGet uses the fairly old `System.IO.Packaging` namespace to decompress the nuget package:\r\n(see ~~https://github.com/NuGet/NuGet2/blob/dev/src/Core/Packages/ZipPackage.cs#L142~~\r\nhttps://github.com/NuGet/NuGet2/blob/dev/src/Core/Packages/OptimizedZipPackage.cs#L193)\r\nWith a nuget package, created under Mono this line throws a NotSupportedException, because the `System.IO.Packaging.Package` or the `MS.Internal.IO.Zip.ZipArchive` cannot handle the Version 0x3F (only up to Version 4.5 or 0x002D). This is a problem, when the package is created with a build server like Travis-CI.\r\n\r\nStackTrace (sorry, in German):\r\n```\r\n   bei MS.Internal.IO.Zip.ZipArchive.VerifyVersionNeededToExtract(UInt16 version)\r\n   bei MS.Internal.IO.Zip.ZipIOLocalFileHeader.Validate()\r\n   bei MS.Internal.IO.Zip.ZipIOLocalFileHeader.ParseRecord(BinaryReader reader, Encoding encoding)\r\n   bei MS.Internal.IO.Zip.ZipIOLocalFileBlock.ParseRecord(BinaryReader reader, String fileName, Int64 position, ZipIOCentralDirectoryBlock centralDir, ZipIOCentralDirectoryFileHeader centralDirFileHeader)\r\n   bei MS.Internal.IO.Zip.ZipIOLocalFileBlock.SeekableLoad(ZipIOBlockManager blockManager, String fileName)\r\n   bei MS.Internal.IO.Zip.ZipIOBlockManager.LoadLocalFileBlock(String zipFileName)\r\n   bei MS.Internal.IO.Zip.ZipArchive.GetFile(String zipFileName)\r\n   bei MS.Internal.IO.Zip.ZipArchive.GetFiles()\r\n   bei System.IO.Packaging.ZipPackage.ContentTypeHelper..ctor(ZipArchive zipArchive, IgnoredItemHelper ignoredItemHelper)\r\n   bei System.IO.Packaging.ZipPackage..ctor(Stream s, FileMode mode, FileAccess access, Boolean streaming)\r\n   bei System.IO.Packaging.Package.Open(Stream stream, FileMode packageMode, FileAccess packageAccess, Boolean streaming)\r\n   bei System.IO.Packaging.Package.Open(Stream stream)\r\n   bei NuGet.OptimizedZipPackage.EnsureManifest() in C:\\Users\\martingondermann\\Desktop\\test\\NuGet2\\src\\Core\\Packages\\OptimizedZipPackage.cs:Zeile 195.\r\n   bei NuGet.OptimizedZipPackage..ctor(IFileSystem fileSystem, String packagePath) in C:\\Users\\martingondermann\\Desktop\\test\\NuGet2\\src\\Core\\Packages\\OptimizedZipPackage.cs:Zeile 87.\r\n   bei NuGet.LocalPackageRepository.OpenPackage(String path) in C:\\Users\\martingondermann\\Desktop\\test\\NuGet2\\src\\Core\\Repositories\\LocalPackageRepository.cs:Zeile 350.\r\n   bei NuGet.LocalPackageRepository.GetPackage(Func`2 openPackage, String path) in C:\\Users\\martingondermann\\Desktop\\test\\NuGet2\\src\\Core\\Repositories\\LocalPackageRepository.cs:Zeile 297.\r\n   bei NuGet.LocalPackageRepository.<GetPackages>d__28.MoveNext() in C:\\Users\\martingondermann\\Desktop\\test\\NuGet2\\src\\Core\\Repositories\\LocalPackageRepository.cs:Zeile 254.\r\n   bei NuGet.CollectionExtensions.AddRange[T](ICollection`1 collection, IEnumerable`1 items) in C:\\Users\\martingondermann\\Desktop\\test\\NuGet2\\src\\Core\\Extensions\\CollectionExtensions.cs:Zeile 11.\r\n   bei NuGet.LocalPackageRepository.FindPackagesById(Func`2 openPackage, String packageId) in C:\\Users\\martingondermann\\Desktop\\test\\NuGet2\\src\\Core\\Repositories\\LocalPackageRepository.cs:Zeile 230.\r\n   bei NuGet.LocalPackageRepository.FindPackagesById(String packageId) in C:\\Users\\martingondermann\\Desktop\\test\\NuGet2\\src\\Core\\Repositories\\LocalPackageRepository.cs:Zeile 158.\r\n   bei NuGet.PackageRepositoryExtensions.FindPackagesById(IPackageRepository repository, String packageId) in C:\\Users\\martingondermann\\Desktop\\test\\NuGet2\\src\\Core\\Repositories\\PackageRepositoryExtensions.cs:Zeile 179.\r\n   bei NuGet.Commands.InstallCommand.GetLastestPackageVersion(IPackageRepository repo, String id, Boolean allowPrereleaseVersions) in C:\\Users\\martingondermann\\Desktop\\test\\NuGet2\\src\\CommandLine\\Commands\\InstallCommand.cs:Zeile 346.\r\n   bei NuGet.Commands.InstallCommand.<>c__DisplayClass38_0.<GetLatestVersionPackageByIdFromAggregateRepository>b__1(Object state) in C:\\Users\\martingondermann\\Desktop\\test\\NuGet2\\src\\CommandLine\\Commands\\InstallCommand.cs:Zeile 369.\r\n   bei System.Threading.Tasks.Task`1.InnerInvoke()\r\n   bei System.Threading.Tasks.Task.Execute()\r\n```"}}