由于某些原因,在部署到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)
我使用Microsoft.NETCore.UniversalWindowsPlatform = 5.4.0定位15063(创作者更新)
我已经尝试显式(否则引用是传递的)引用System.IO.Compression = 4.3.0和runtime.native.System.IO.Compression = 4.3.0,两者都没有成功。
另外,我试图强制降级到System.IO.Compression = 4.1.1,但问题并没有消失。
我缺少Nuget参考吗?或者只是在XBox上破坏了包
答案 0 :(得分:0)
我强制降级System.IO.Compression到4.0.0,这带来了必要的依赖。