May 3, 200719 yr Hi All,I am using "NotASenator" tutorial part1.I did the SAME as the docs and when I running the app I am getting the following error:Could not load file or assembly 'Microsoft.FlightSimulator.SimConnect, Version=10.0.60905.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format.I made a reference to the DLL and I also run the Simconnect.MSI.I attached the code here:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using Microsoft.FlightSimulator.SimConnect;using System.Runtime.InteropServices;namespace SimConnect_Tutorial{ public partial class Form1 : Form { SimConnect simconnect; const int WM_USER_SIMCONNECT = 0x0402; public Form1() { simconnect = new SimConnect("SimConnect_Tutorial", this.Handle, WM_USER_SIMCONNECT, null, 0); InitializeComponent(); } }}I am using windows vista and VS2005.Can anyone tell me what is going on here?Thanks
May 3, 200719 yr Commercial Member >Could not load file or assembly>'Microsoft.FlightSimulator.SimConnect, Version=10.0.60905.0,>Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of>its dependencies. An attempt was made to load a program with>an incorrect format.> ...>I am using windows vista and VS2005.>Can anyone tell me what is going on here?Looks like you failed to tell VS2005 to build the Manifest into your program. The Manifest data in included in "SimConnect.h", but you still need to set things correctly in the Project Properties.With VS2005 it is easy enough -- in Linker-Manifest File make sure a Manifest is generated, and in Manifest Tool-Input and Output make sure "Embed Manifest" is set to 'yes'.RegardsPete Win10: 22H2 19045.2728 CPU: 9900KS at 5.5GHz Memory: 32Gb at 3800 MHz. GPU: RTX 24Gb Titan 2 x 2160p projectors at 25Hz onto 200 FOV curved screen
May 3, 200719 yr >Looks like you failed to tell VS2005 to build the Manifest>into your program. The Manifest data in included in>"SimConnect.h", but you still need to set things correctly in>the Project Properties.>>With VS2005 it is easy enough -- in Linker-Manifest File make>sure a Manifest is generated, and in Manifest Tool-Input and>Output make sure "Embed Manifest" is set to 'yes'.>>Regards>>Pete>Dear Pete,Thank you very much for your reply but I am new to all this kinds of words.can you please tell me what is Manifest and from where should I configure it.OHHH, I coding using c#, should I include the "SimConnect.h"? in the tutorial I am working it says to make a referance to the DLL but nothing else.Thanks
May 3, 200719 yr >Looks like you failed to tell VS2005 to build the Manifest>into your program. The Manifest data in included in>"SimConnect.h", but you still need to set things correctly in>the Project Properties.>>With VS2005 it is easy enough -- in Linker-Manifest File make>sure a Manifest is generated, and in Manifest Tool-Input and>Output make sure "Embed Manifest" is set to 'yes'.>>Regards>>Pete>Dear Pete,Thank you very much for your reply but I am new to all this kinds of words.can you please tell me what is Manifest and from where should I configure it.OHHH, I coding using c#, should I include the "SimConnect.h"? in the tutorial I am working it says to make a referance to the DLL but nothing else.Thanks
May 23, 200719 yr Does your C# project have a reference to the managed simconnect library DLL?You must add a reference to this DLL (Use the 'References' folder under your project).Here's what my reference looks like:G:FSK-SDKSDKCore Utilities KitSimConnect SDKlibmanagedMicrosoft.FlightSimulator.SimConnect.dllI know you say you have a refence to "the DLL" but I wanted to make sure you are referencing the right one. Also, are you running VS2005 under administrator privileges?Just a thought. Jeff Bea I am an avid globetrotter with my trusty Lufthansa B777F, Polar Air Cargo B744F, and Atlas Air B748F.
May 23, 200719 yr I installed all the SDK again and did the same way as I did beforeand it is working.Thanks
Create an account or sign in to comment