Exported game crashing when running c# script

Godot Version

4.2.1

Question

I’m trying to export the game to Windows but the game is getting an error when trying to interact with the C# script that interacts with Stockfish executable.

It’s a chess game, and after making the player move, I call a c# script (using gdscript, cross-language) to get the next move for the machine player. At this moment, the game can’t continue.

Running through the console, I was able to get the error message, but this doesn’t happen when running from the editor (the game runs fine).


I’m not sure what the message means, and why it happens only with the exported game.

In the export config, I made sure to include .exe files to the export. I’m also embedding the pck.

The game seems able to connect to the Stockfish engine and even receives the best move from it.

Actually, stockfish.exe isn’t there. This is the error message in Portuguese saying the executable wasn’t found.

How do I properly include the .exe file?