Sign in to follow this  
Guest codvir

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

Recommended Posts

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
Help AVSIM continue to serve you!
Please donate today!

>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

Share this post


Link to post
Share on other sites

>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

>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.

Share this post


Link to post
Share on other sites

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