-
Notifications
You must be signed in to change notification settings - Fork 510
How to use the System.IO.Compression namespace ? #5496
Comments
We have not done the work to link clrcompression into the final binary. The workaround is to copy clrcompression.dll next the native .exe. E.g. publish the app as regular standalone app using This workaround won't give you a single file native binary. Is it something that you need to have? |
Thanks, the workaround works. I'd prefer a single binary, but a binary and a dll is good enough and a large improvement. |
clrcompression needs to be manually copied beside the final .exe, but other than that, it's a single .exe file which can take nugets and de-compresses them. See dotnet/corert#5496 Also, it can decompress into long paths!
I have run into same issue:
Copying the clrcompression.dll dll fixes the issue for now. |
The work required for this:
|
The recommended workaround isn't working for me. I just get an error message that says The DLL in question is labeled as version 4.6.26515.6, if it matters, and |
clrcompression.dll needs to be in sync with the rest of framework bits. Here is how you can get the right bits manually at the moment:
I am adding the good clrcompression.dll to CoreRT package in #6009. It will make this workaround easier (binplace it from the CoreRT package, no need to fish for the right version). |
This makes it easier to work around #5496
The workaround for now is to add this snippet to your .csproj file:
|
Bumping as I just ran into this issue. Would adding clrcompression.dll as a reference dll solve this issue for a temporary workaround to produce a single binary? |
@brunomlopes have you tried again since the most recent merge? |
Not yet, my use case for this has been running ok with the previous workaround, and hadn't had a reason to revisit it. |
If you are in Linux, the following would be neat:
|
Say I've got the following core on a .net core console app:
If I compile it with
dotnet publish -c Release -r win-x64
, and try to run it withCoreRt.TestCompression.exe ..\sample-zip.zip
, it fails withFrom 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?
The text was updated successfully, but these errors were encountered: