-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
kernel32 not found (on linux) #89
Comments
@tzachshabtay thanks for detail explanation, however, it looks like your code is referring to the NET45 assembly, instead of .net Standard one. Which does not doing OS detection it assumes the OS is Windows. I would advice to fix the reference fist. |
@Ruslan-B how do I reference the .net standard assembly, then? I just added the package via nuget. And also, why does your code assume net45 is windows? Thanks for the response. |
Package contains two assembles one is |
Ah, indeed the net45 assembly is copied instead of the netstandard one. My scenario is that I have a dotnet stanard library referencing your library, and a mono/dotnet console app targetting dotnet 4.6.1 referencing my library (an executable cannot target netstandard- it's for libraries only). In the executable I tried to change the target framework for the package to netstandard2, didn't work (still net45 assembly gets copied). I wanted to look in your nuspec to see how it's packaged (I don't if and how it uses reference groups: https://docs.microsoft.com/en-us/nuget/reference/nuspec#reference-groups), but it's not in the repo? Interesting observation: looking at the build log, I saw that my library was using the net45 assembly. Then I added
This could be hacked around: |
Hmm, so you can convert your application to .net core 2.0? Any way I guess it wouldn't be a problem to add another target net461 in to nuget package. I'll take a look. As for hacks you can redefine |
@tzachshabtay I wouldn't work: |
Did you see my link about the reference groups?
I'm not completely confident this would work, but it might... Regardless, is there a reason not to implement the workaround I mentioned for net45? I can't migrate to netcore (I have dependencies that don't support it), I might be able to upgrade to 4.7.1, but I don't want to lose potential target platforms if I can help it. |
I saw it but it wouldn't work in case you have 4.6.* framework or lower. |
Ok, that will work too, I guess. |
I've updated the package. Feel free to reopen if this issue will reoccur. |
**I'm submitting a ... **
What is the current behavior?
Running from linux with mono, but ffmpeg.autogen seems to think I'm running from Windows.
This is my sample code (but pretty sure it will happen no matter what ffmpeg function I'll try to invoke):
I'm expecting it to search for the linux library, not the Windows library.
I want to use ffmpeg autogen on linux.
Here's the stacktrace:
I looked at the code of
LibraryLoader
, and added this code to my test before calling ffmpeg:The output:
So it seems to work fine in my code but somehow fails in your code.
My only guess is that maybe you somehow packaged with the wrong RuntimeInformation assembly? See this issue: https://github.com/dotnet/corefx/issues/3032
The text was updated successfully, but these errors were encountered: