【问题标题】:ZipArchive in XBox UWP applicationXbox UWP 应用程序中的 ZipArchive
【发布时间】: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 上损坏了软件包

【问题讨论】:

    标签: uwp xbox


    【解决方案1】:

    我将 System.IO.Compression 强制降级为 4.0.0,这带来了必要的依赖关系。

    【讨论】:

      猜你喜欢
      • 2018-07-19
      • 2016-04-02
      • 2016-10-02
      • 2021-12-05
      • 2021-11-15
      • 2016-07-22
      • 2017-09-20
      相关资源
      最近更新 更多