-
Notifications
You must be signed in to change notification settings - Fork 174
Unable to find an entry point named 'CompressionNative_DeflateInit2_' in DLL 'clrcompression.dll' #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@hrumhurum Another issue related to assembly loading. Have not looked into the details, but seems related to native dlls |
Maybe related? dotnet/corert#5496 |
A naïve approach trying to reproduce the issue works as expected. test.csx: using System.IO.Compression;
var ms = new MemoryStream();
var cs = new DeflateStream(ms, CompressionMode.Compress);
var bw = new BinaryWriter(cs);
string s = "Test Test Test Test Test Test Test Test Test Test Test Test Test";
bw.Write(s);
bw.Flush();
bool result = ms.Length > 0 && ms.Length < s.Length;
Console.WriteLine(result ? "OK" : "NOK"); The output of
Running
@SvenEssentry, can you please send a reproduction sample? |
One thing I have noticed. If a script does this
It will return |
It should not return |
|
Was able to reproduce it with Upon closer inspection, it turned out that #if NETCOREAPP3_0_OR_GREATER
using var contextualReflectionScope = assemblyLoadContext != null ? assemblyLoadContext.EnterContextualReflection() : default;
#endif Have no idea how that could happen, other than a bug in toolchain version installed at the build server. I will cover this with a unit test and will send a PR. |
Maybe just?
|
That line does not need Not a problem, as it will be covered in a test after implementation of opt-in option. It seems that the build server just has an older or buggy version that does not understand |
Perfect. Let's hope that solves the issues 👍😊 |
Since version 1.2.0 an issue occurs when using System.IO.Compression.ZipArchive (an possibly other native implementations).
After uninstalling version 1.2.0 and installing 1.1.0, the issue was resolved.
This is the piece of code, that throws an exception
The text was updated successfully, but these errors were encountered: