1
votes

For some reason a UWP app, that works perfectly fine on Windows 10 machine when deployed to XBox can not work with a .zip archive using standard ZipArchive class. It seems to be similar to this issue: Unzipping throws an "The underlying compression routine could not be loaded correctly", but only happens on XBox.

System.IO.Compression.ZLibException: The underlying compression routine could not be loaded correctly.
 ---> System.DllNotFoundException: Unable to load DLL 'clrcompression.dll':
 The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Interop.zlib.inflateInit2_(Byte* stream, Int32 windowBits, Byte* version, Int32 stream_size)
at Interop.zlib.InflateInit2_(ZStream& stream, Int32 windowBits)
at System.IO.Compression.ZLibNative.ZLibStreamHandle.InflateInit2_(Int32 windowBits)
at System.IO.Compression.Inflater.InflateInit(Int32 windowBits)
--- End of inner exception stack trace ---
at System.IO.Compression.Inflater.InflateInit(Int32 windowBits)
at System.IO.Compression.DeflateStream.InitializeInflater(Stream stream, Boolean leaveOpen, Int32 windowBits)
at System.IO.Compression.ZipArchiveEntry.GetDataDecompressor(Stream compressedStreamToRead)

I am targeting 15063 (Creators Update) with Microsoft.NETCore.UniversalWindowsPlatform=5.4.0

I have tried to explicitly (otherwise the reference is transitive) reference System.IO.Compression=4.3.0 and runtime.native.System.IO.Compression=4.3.0, both to no success.

Also, I've tried to force downgrade to System.IO.Compression=4.1.1, but the issue did not go away.

Is there a Nuget reference I am missing? Or are packages simply broken on XBox

1

1 Answers

0
votes

I force-downgraded System.IO.Compression to 4.0.0, which brought necessary dependencies.