Visual Studio Codeยถ
After reading the "Prerequisites" section, you can download and install Visual Studio Code (aka VS Code).
In Godot's Editor โ Editor Settings menu:
Set Dotnet -> Editor -> External Editor to Visual Studio Code.
In Visual Studio Code:
Install the C# extension.
Note
If you are using Linux you need to install the Mono SDK for the C# tools plugin to work.
To configure a project for debugging, you need a tasks.json
and launch.json
file in the .vscode
folder with the necessary configuration. An example configuration can be found here . In the launch.json file, make sure the program parameter in the relevant configuration points to your Godot executable, either by changing it to the path of the executable or by defining a GODOT4 environment variable that points to the executable. Now, when you start the debugger in Visual Studio Code, your Godot project will run.
Visual Studio (Windows only)ยถ
Download and install the latest version of Visual Studio. Visual Studio will include the required SDKs if you have the correct workloads selected, so you don't need to manually install the things listed in the "Prerequisites" section.
While installing Visual Studio, select this workload:
.NET desktop development
In Godot's Editor โ Editor Settings menu:
Set Dotnet -> Editor -> External Editor to Visual Studio.
Note
If you see an error like "Unable to find package Godot.NET.Sdk", your NuGet configuration may be incorrect and need to be fixed.
A simple way to fix the NuGet configuration file is to regenerate it. In a file explorer window, go to %AppData%\NuGet. Rename or delete the NuGet.Config file. When you build your Godot project again, the file will be automatically created with default values.