PLATFORM TOOLSET
C/C++ can be used to develop standalone modules or gauges for Microsoft Flight Simulator 2024 through a specific Platform Toolset named Microsoft Flight Simulator 2024 which installs at the same time as the SDK itself (see Additional Tools for more details). While previous iterations of the game compiled the C/C++ code into a DLL, the new toolset compiles it into a WebAssembly module (extension " *.wasm
"). This module can then be either placed in the modules subfolder of a package to be automatically loaded when the said packaged is mounted, or referenced from an aircraft panel.cfg
file if it includes gauges (in a similar manner to the old DLLs).
Requirements
In order to use the Microsoft Flight Simulator 2024 Platform Toolset, you need to have Visual Studio 2017 or later installed.
Creating A Project
The Microsoft Flight Simulator Platform Toolset comes with a few predefined Visual Studio templates for your projects which you can use as follows:
- Start Visual Studio.
- Select the " Create a New Project" option.
- In the filters select "C++" for the language, "Microsoft Flight Simulator" for the platform and "WebAssembly" for the project type.
- In the list below the filters, select "MSFS WASM Module", "MSFS WASM Static Library" or "MSFS WASM Gauge Demo" and press Next.
- In the "Configure your new project" window, select the location of the project and press Create.
You can find a complete tutorial to get you started - including setup information for Visual Studio - on the following page:
Migrating A Project
If you already have a project developed for other platforms, you can easily add a new configuration to support Microsoft Flight Simulator 2024:
- Start Visual Studio.
- Open your project/solution.
- Once your project is loaded, right-click on the solution in the "Solution Explorer" and use the "Properties" option.
- In the left list, click on "Configuration Properties".
- Click on " Configuration Manager" in the top right corner of the window.
- Click on the "Active solution platform" list and select "<New...>".
- In the "Type or select the new platform:" list, select MSFS 2024. In the "Copy settings from:" list, select "". Make sure the " Create new project platforms" checkbox is checked.
- Press "OK".
Debugging
If you need to debug a compiled WASM module, then there is also an extension available for Visual Studio that can help you do this as well as a WASM Debug window for viewing specific details in the simulation. Please see here for more information: