🤔

Visual Studio Code Old Visual Studio Code configuration#

error

As of August 2023 Microsoft has released a new version of the Unity extension for VS Code.
See the new configuration steps if you aren't stuck on an old version of Unity.

Steps#

Windows#

  1. Install the .NET SDK.
    1. Logout or restart Windows.
  2. Install the .NET Framework 4.7.1 Developer Pack.
  3. Install MSBuild Tools.
  4. Install the C# Extension from the VS Code Marketplace.
  5. In the VS Code Settings editor (Ctrl+,), uncheck the C# extension's Omnisharp: Use Modern Net setting ("omnisharp.useModernNet": false).
  6. Set the External Script Editor dropdown in Unity's External Tools preferences (EditPreferencesExternal Tools) to VS Code.

macOS/Linux#

  1. Install the .NET SDK.
  2. Install the .NET Framework 4.7.1 Developer Pack.
  3. Install Mono with MSBuild.
  4. Install the C# Extension from the VS Code Marketplace.
  5. In the VS Code Settings editor (Ctrl+,), uncheck the C# extension's Omnisharp: Use Modern Net setting ("omnisharp.useModernNet": false).
  6. Set the External Script Editor dropdown in Unity's External Tools preferences (EditPreferencesExternal Tools) to VS Code.
  1. Install and update the Visual Studio Code Editor package in UPM (com.unity.ide.vscode).
    As a last resort to troubleshooting setup try rolling back the package as some versions have introduced issues. You can always update it again if that fails.

⚠️ Warning#

VS Code support is limited.

As VS Code is complex to configure, and is currently not receiving support for use with Unity, Visual Studio or JetBrains Rider are recommended instead.


See the new configuration steps.