Hi guys,
I'm new to this kind of thingsand I would like to receive some information/help.
The Problem:
I downlaod the sdk from MSFS20 and installed
I 've made a c# project within vs2019 and I've add the reference to the Microsoft.FlightSimulator.SimConnect.dll located in MSFS SDK\SimConnect SDK\lib\managed.
I've wrote a simple script and I've compiled it:
When I press a button it create SimConnection() as follow:
as soon as I press the button and as soon it loads the dll to invoke the function call I get this error:
System.BadImageFormatException: 'Could not load file or assembly 'Microsoft.FlightSimulator.SimConnect, Version=11.0.62651.3, Culture=neutral, PublicKeyToken=baf445ffb3a06b5c' or one of its dependencies. An attempt was made to load a program with an incorrect format.'
How could I resolve this problem? Am I missing something or importing the wrong dll?
I'm new to this kind of thingsand I would like to receive some information/help.
The Problem:
I downlaod the sdk from MSFS20 and installed
I 've made a c# project within vs2019 and I've add the reference to the Microsoft.FlightSimulator.SimConnect.dll located in MSFS SDK\SimConnect SDK\lib\managed.
I've wrote a simple script and I've compiled it:
When I press a button it create SimConnection() as follow:
Code:
Handle = new IntPtr();
simConnect = new SimConnect("Teleporter", Handle, CONSTANTS.USER_SIMCONNECT, null, 0);
as soon as I press the button and as soon it loads the dll to invoke the function call I get this error:
System.BadImageFormatException: 'Could not load file or assembly 'Microsoft.FlightSimulator.SimConnect, Version=11.0.62651.3, Culture=neutral, PublicKeyToken=baf445ffb3a06b5c' or one of its dependencies. An attempt was made to load a program with an incorrect format.'
How could I resolve this problem? Am I missing something or importing the wrong dll?
Last edited: