-
Notifications
You must be signed in to change notification settings - Fork 20
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
Unable to load magic1.dll manually in windows #10
Comments
This means that you are trying to use x86 dll in x64 proj or vice versa. |
hmm |
@patachi I'm updated the package with windows support (included x64 dll). Now you do not need to install the DLL manually. |
ohh thank you ^_^ welp i create new classic win form project and added Mime with NuGet (Update Saturday, April 8, 2017 (4/8/2017)) and write a simple code like
and still i got this error : |
Hmm, it's very strange. Which windows version you are using? 32 or 64 bit? |
win 10 x64 |
Ok, I have same system. |
@patachi It's seems like i'm solve that problem. Update package and you will need to set platform x64 in your application. |
yup it works fine |
@hey-red Last version (2.3.0) not working for AnyCPU platform. |
@sacerdotu change platform to x64. |
@hey-red But I need anycpu :) If I change to x64 it will work for sure. |
@hey-red This is an issue that should be fixed at HeyRed.Mime.MagicNative.magic_open(MagicOpenFlags flags) |
Currently there is no x86 support. Maybe later i'm trying to build 32-bit libmagic, and АnyCPU will be works by default. |
Perfect. Waiting for the new version! |
@hey-red Any news? |
@hey-red uploaded to azure change the application setting to 64bit but problem not solved. check the server but locally its working fine.. what is happening can u help me? |
@himadrinath |
@hey-red i did now i am getting another error
BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) |
Your VM under linux or windows? |
@hey-red windows |
@hey-red i found this aspnet/KestrelHttpServer#1625 (comment) |
Yep, its seems like app run in x86 mode. Also, by default azure VM uses x64 windows? |
@hey-red working on it. lets see what happen. i will inform you the result |
@hey-red i changed the runtime to win-x64 and deploy to azure now its working fine. thanks for your help |
it would be great if you update this :>
ty in advance .
Errors :
Unable to load DLL 'libmagic1': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
Stack Trace :
at HeyRed.Mime.MagicNative.magic_open(MagicOpenFlags flags)
at HeyRed.Mime.Magic..ctor(MagicOpenFlags flags, String dbPath)
at HeyRed.Mime.MimeGuesser.GuessMimeType(Byte[] buffer, Int32 size)
.....
The text was updated successfully, but these errors were encountered: