You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
Say I've got the following core on a .net core console app:
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
using(var stream = File.OpenRead(args[0]))
using (var compressed = new ZipArchive(stream, ZipArchiveMode.Read))
{
foreach (var zipArchiveEntry in compressed.Entries)
{
using (var fileStream = zipArchiveEntry.Open())
using (var outputStream = new MemoryStream())
{
fileStream.CopyTo(outputStream);
}
Console.WriteLine($"Wrote {zipArchiveEntry.FullName}");
}
}
}
If I compile it with dotnet publish -c Release -r win-x64, and try to run it with CoreRt.TestCompression.exe ..\sample-zip.zip, it fails with
Unhandled Exception: 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.
at CoreRt.TestCompresssion!<BaseAddress>+0x11d293
at CoreRt.TestCompresssion!<BaseAddress>+0x11d1b0
at Interop.zlib.inflateInit2_(Byte*, Int32, Byte*, Int32) + 0x42
at Interop.zlib.InflateInit2_(ZLibNative.ZStream&, Int32) + 0x49
at System.IO.Compression.ZLibNative.ZLibStreamHandle.InflateInit2_(Int32) + 0x29
at System.IO.Compression.Inflater.InflateInit(Int32) + 0x40
From a quick search, this looks like clrcompression.dll is native code that doesn't get pulled in?
Is there anything I can do to work past this?