I have been developing a Windows application for the past 6 months for my internship. This program works as it should do on the laptop where its programmed, but I need to set the program on another laptop. I installed the same dotnet core version (3.0.100) and started the .exe with all the DLLs necessary in the same directory (as it is compiled). But when I do this I get the error shown below.
[ERROR][1/23/2020 7:58:41 PM][Thread 0006][akka://ModulairVisionFramework/user/InterfaceCameraActor] Error while creating actor instance of type CameraSystem.InterfaceCameraActor with 0 args: ()
Cause: [akka://ModulairVisionFramework/user/InterfaceCameraActor#1923472091]: Akka.Actor.ActorInitializationException: Exception during creation
---> System.TypeLoadException: Error while creating actor instance of type CameraSystem.InterfaceCameraActor with 0 args: ()
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.BadImageFormatException: Could not load file or assembly 'VimbaNET, Version=1.8.0.27270, Culture=neutral, PublicKeyToken=96b729f24f119b9a'. An attempt was made to load a program with an incorrect format.
File name: 'VimbaNET, Version=1.8.0.27270, Culture=neutral, PublicKeyToken=96b729f24f119b9a'
at CameraSystem.InterfaceCameraActor..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Akka.Actor.Props.ActivatorProducer.Produce()
at Akka.Actor.Props.NewActor()
--- End of inner exception stack trace ---
at Akka.Actor.Props.NewActor()
at Akka.Actor.ActorCell.CreateNewActorInstance()
at Akka.Actor.ActorCell.<>c__DisplayClass109_0.<NewActor>b__0()
at Akka.Actor.ActorCell.UseThreadContext(Action action)
at Akka.Actor.ActorCell.NewActor()
at Akka.Actor.ActorCell.Create(Exception failure)
--- End of inner exception stack trace ---
at Akka.Actor.ActorCell.Create(Exception failure)
at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)
[INFO][1/23/2020 7:58:44 PM][Thread 0008][akka://ModulairVisionFramework/user/InterfaceCameraActor] Message Initialize from akka://ModulairVisionFramework/user/FrameworkActor to akka://ModulairVisionFramework/user/InterfaceCameraActor was not delivered. 1 dead letters encountered.
This error System.BadImageFormatException: Could not load file or assembly
gives me the idea that I may use the wrong DLL of VimbaNET
, but I'm 100% sure that I use the right one. If I do use the wrong DLL of VimbaNET
then I do get the same error as above, but I also get the error if I use the right DLL. I also tried to compile the application on the new laptop with the same IDE, but the result is the same.
Both of the laptops are 64 bit.
Does anyone know how I can solve this issue?
The 32bit version of of my application gives the same error.
Settings that I use to compile and run the program in 64bit.
Settings that I use to compile and run the program in 32bit.
assembly Information of all 3 assemblies that are involved in the issue.
VimbaNET is the DLL that causes the issues
CameraSystem is my own Assembly that used VimbaNET
ModulairVisionFramework is the main application that makes use of the CameraSystem assembly