plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

sloppy99 avatar image
sloppy99 asked fwr0 commented

Microsoft.Flightsimulator.Simconnect.dll vs Simconnect.dll

Could someone explain the difference between the SDK dlls - Microsoft.Flightsimulator.Simconnect.dll and Simconnect.dll


Do you need to have both dlls in the Simconnect client folder for the simconnect client exe to work?

simconnect
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Arzop avatar image
Arzop answered fwr0 commented

Hi,

SimConnect.dll is the dll used by a C++ client.

Microsoft.FlightSimulator.Simconnect.dll is a wrapper around the c++ dll that allows it to be used by a C# client (type conversion, cast void* to object...)

If you use C++ to code your client, it is easier to use the static lib (...\MSFS SDK\SimConnect SDK\lib\SimConnect.lib) which wraps the dll or the full static lib.

If you use C#, you have to reference Microsoft.FlightSimulator.Simconnect.dll in your project (which will automatically be copied next to your exe) and add a post build event (or something else) to copy SimConnect.dll next to your exe.


Best Regards

Maxime / Asobo

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

fwr0 avatar image fwr0 commented ·

Looking in the documentation here:

https://docs.flightsimulator.com/html/Programming_Tools/SimConnect/Programming_SimConnect_Clients_using_Managed_Code.htm

The managed SimConnect assembly is installed in the GAC (global assembly cache) during the installation of the SimConnect SDK, so it should not be manually placed anywhere for your application to run. However, you do need to reference a copy of this dll in Visual Studio so that it can resolve symbols at compile time. As Visual Studio does not support referencing an assembly stored in the GAC, a copy of the SimConnect.dll outside the simconnect SDK msi is shipped solely for this purpose.

The only thing I found in my GAC was an old 32-bit version of the dll (10.x, not the current 11.x version).

Is that just old documentation that no longer applies?

0 Likes 0 ·
Kaiii3 avatar image
Kaiii3 answered

You need both files, but only refference the Microsoft.FlightSimulator.SimConnect.DLL

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

sloppy99 avatar image
sloppy99 answered

Arzop, thanks for your answer. Now I understand it because of your good feedback.

10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.