Jump to content
Sign in to follow this  
Guest codvir

'Microsoft.FlightSimulator.SimConnect, Version=10.0.609...

Recommended Posts

Guest codvir

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

Share this post


Link to post
Share on other sites

>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

Share this post


Link to post
Share on other sites
Guest codvir

>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

Share this post


Link to post
Share on other sites
Guest codvir

>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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Guest coolfsx

I installed all the SDK again and did the same way as I did beforeand it is working.Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...