Simconnect SubscribeToSystemEvent AircraftLoaded filepath error

Version: 1.1.7.0

Frequency: Consistently

Severity: High

Marketplace package name: n/a

Context: Flight logger in C# managed simconnect using SubscribeToSystemEvent “AircraftLoaded”

Similar MSFS 2020 issue: works fine in MSFS2020

Bug description:

It seems like MSFS2024 is triggering the AircraftLoaded SystemEvent before the file given in the filepath is available to read.

Using a Visual Studio compiled C# simconnect external .exe application which after connecting to the sim issues:

sim?.SubscribeToSystemEvent(SIMEVENT_ID.AircraftLoaded, "AircraftLoaded");

this will result in a callback to

OnRecvEventFilename(SimConnect sender, SIMCONNECT_RECV_EVENT_FILENAME ev)

In my case, the file path returned in that ‘ev’ struct for the a320neo is:

c:\users\fripl\appdata\roaming\microsoft flight simulator 2024\streamedpackages\microsoft-aircraft-a320neo\content\simobjects\airplanes\microsoft-a320neo\presets\inibuilds\a20n\config\aircraft.cfg

but file_contents = File.ReadAllText(file_path); results in the C# System.IO.DirectoryNotFoundException:

System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\users\fripl\appdata\roaming\microsoft flight simulator 2024\streamedpackages\microsoft-aircraft-a320neo\content\simobjects\airplanes\microsoft-a320neo\presets\inibuilds\a20n\config\aircraft.cfg'

Repro steps:

  1. use a Windows C# simconnect program to subscribe to the AircraftLoaded SystemEvent (in my case I’m using NB21 Logger)
  2. try reading the file referenced by the provided filepath.

Issue is the same with c++

it will return : .\LocalState\streamedpackages\microsoft-aircraft-a320neo\content\simobjects\airplanes\microsoft-a320neo\presets\inibuilds\a20n\config\aircraft.cfg

but the presets folder doesn’t even exist in streamedpackages

instead the presets folder is created in
.\LocalCache\SimObjects\Airplanes\microsoft-a320neo\

And the worst part is the content of the presets folder gets deleted as soon as it get read by MSFS.

I know there was a discussion to prevent core files to be modfied, but not even allowing them to be read is a bit much.

These files a small they should be allowed to remain in the local cache for the duration of the game session.

Being able to read the flight_model.cfg is essential for my addons. If I lose this capability I’m dead in the water.

Plz fix.