As of August 2023 Microsoft has released a new version of the Unity extension for VS Code.
The new extension relies on the C# Dev Kit. Do note that this is unlike the previous extensions, so now it falls under a new license similar to Visual Studio Community's.
- Install a Unity version greater than or equal to 2021.
- Ensure the Visual Studio Editor package installed and updated to at least
2.0.20
in UPM (com.unity.ide.visualstudio
).

This is not the Visual Studio Code Editor package, if it is installed you should remove it.
- Install the Unity for Visual Studio Code extension.
- Set the External Script Editor dropdown in Unity's External Tools preferences () to Visual Studio Code.
- If you have compiler errors, if possible comment out those files so Unity can compile code.
- Check your C# and C# Dev Kit extensions are upgraded to the latest versions.
- Install the .NET SDK.
- Logout or restart Windows.
- Restart VS Code.
- Open the project from Unity's menu.
- Restart your computer.