【发布时间】:2018-01-24 00:49:57
【问题描述】:
由于某种原因,当部署到 XBox 时,在 Windows 10 机器上运行良好的 UWP 应用程序无法使用标准 ZipArchive 类处理 .zip 存档。它似乎与这个问题类似:Unzipping throws an "The underlying compression routine could not be loaded correctly",但只发生在 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)
我的目标是 15063(创建者更新),Microsoft.NETCore.UniversalWindowsPlatform=5.4.0
我尝试显式(否则引用是可传递的)引用 System.IO.Compression=4.3.0 和 runtime.native.System.IO.Compression=4.3.0,均未成功。
另外,我尝试强制降级到 System.IO.Compression=4.1.1,但问题并没有消失。
我是否缺少 Nuget 参考?还是只是在 Xbox 上损坏了软件包
【问题讨论】: