jacobbo / WebEye

WebEye is a collection of .NET controls.
190 stars 132 forks source link

'System.BadImageFormatException' in mscorlib.dll: Could not load file or assembly 'WebEye.Stream.Win32.dll' #84

Open inimirpaz opened 4 years ago

inimirpaz commented 4 years ago

Hi, when running a WinForm software using the WebEye library (both the provided WinForm demo and any other C# project) on Windows 32bit (e.g. Windows 7 x86) the following exception occurs:

'System.BadImageFormatException' in mscorlib.dll: Could not load file or assembly 'WebEye.Stream.Win32.dll' or one of its dependencies. is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)

Specifically, it happens when invoking the Assembly.Load(): https://github.com/jacobbo/WebEye/blob/1ce7f899847338d09e412b79f4f00b09abc06470/WebEye.Stream/Stream.cs#L87

I've already installed VC++ Redist packages on that machine, no luck.

I've also tried to compile the WebEye.Stream.dll and WebEye.Stream.Win32.dll from scratch, but it did not help.

inimirpaz commented 4 years ago

Hi there, I think it may be related to #79 . Has anyone else had this issue as well?

ndrnesterov commented 3 years ago

Hi there, I think it may be related to #79 . Has anyone else had this issue as well?

Hey! Thank you for the wonderful library. I also have this problem.

P.S. Translated via google translator

gigyjoseph commented 2 years ago

I had issue with VS 2015, but rebuilding the application in VS 2017 helped me

Oberchefe commented 1 year ago

I have the same issue in VS2010 but I don't want to buy a new VS. What's the difference between VS2015 and VS2017 for this issue? Are there any Compiler options that could solve this issue?

I want to include the code in an existing VB.Net project and therefore I have translated it from C# into VB.Net. It runs until the above mentioned line of code with the same error code. I have used the DLL from the Nuget package (folder webeye.stream.1.0.2\resources) with a size of 14.172KB.

Any ideas?