2017-08-16 109 views
0

由於某些原因,UWP應用程序在部署到XBox時在Windows 10計算機上運行得非常好,但無法使用標準ZipArchive類使用.zip歸檔。它似乎與此問題類似:Unzipping throws an "The underlying compression routine could not be loaded correctly",但只發生在XBox上。XBox UWP應用程序中的ZipArchive

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

回答

0

我強制降級System.IO.Compression爲4.0.0,它帶來了必要的依賴關係。