2017-08-16 3 views
0

Aus irgendeinem Grund kann eine UWP-Anwendung, die auf Windows 10-Computern einwandfrei funktioniert, wenn sie auf XBox bereitgestellt wird, nicht mit einem ZIP-Archiv mit der Standard-ZipArchive-Klasse arbeiten. Es scheint zu diesem Problem ähnlich zu sein: Unzipping throws an "The underlying compression routine could not be loaded correctly", aber geschieht nur auf XBox.ZipArchive in der XBox UWP-Anwendung

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) 

Ich bin Targeting 15063 (Creators Update) mit Microsoft.NETCore.UniversalWindowsPlatform = 5.4.0

habe ich versucht, explizit (sonst wird die Referenz transitiv) Referenz System.IO.Compression = 4,3. 0 und runtime.native.System.IO.Compression = 4.3.0, beides ohne Erfolg.

Auch habe ich versucht, Downgrade auf System.IO.Compression = 4.1.1 zu erzwingen, aber das Problem ist nicht verschwunden.

Gibt es eine Nuget-Referenz, die ich vermisse? Oder sind Pakete einfach auf XBox zerbrochen

Antwort

0

Ich zwang System.IO.Compression auf 4.0.0, was notwendige Abhängigkeiten brachte.