How can I use Godot 4.0 C# with dotnet run watch?

Viewed 62

Godot 4.0 beta has shipped with C# support, and it reportedly works out of the box with hot-reload support in Visual Studio.

I would like to get this working on my Mac, which doesn't have Visual Studio. I took the launchSettings.json and put it in my Godot project in "Properties/launchSettings.json" with this content (taken from what Visual Studio autogenerated):

{
  "profiles": {
    "Development": {
      "commandName": "Executable",
      "executablePath": "/path/to/Godot_csharp_b1.app/Contents/MacOS/Godot",
      "commandLineArgs": "--debug-server tcp://127.0.0.1:6666",
      "workingDirectory": "/path/to/my/project",
      "authenticationMode": "None",
      "remoteDebugEnabled": false,
      "remoteDebugMachine": ""
    }
  }
}

Now I try to do this:

dotnet watch run --launch-profile Development

However, it doesn't work. It gives this error:

The launch profile "Development" could not be applied.
The launch profile type 'Executable' is not supported.
Unable to run your project.
Ensure you have a runnable project type and ensure 'dotnet run' supports this project.
A runnable project should target a runnable TFM (for instance, net5.0) and have OutputType 'Exe'.
The current OutputType is 'Library'.

Is it possible to work around this? Any way to run Godot on MacOS with hot reloading would be acceptable for me - command line or anything else.

I'm on MacOS + M1 if that is important.

0 Answers
Related