Visual Studio Code does not work for me

Hi guys,

Since many of you are experiencing issues with Visual Studio Code, I figured it might be a good idea to create a thread with potential solutions. I hope this will help. If not, please create a new thread, and don’t forget to mention what you tried to no avail. :slight_smile:

Typical Problems:

  • I cannot see any code suggestions.
  • The compiler does not show any errors if I make a mistake.
  • VS Code does not recognise any namespaces.

VS Code = Visual Studio Code
VS = Visual Studio

They are two different programs.

Visual Studio Code (VS Code)

For VS Code, please follow the instruction on this website and make sure all required extensions are installed: Visual Studio Code and Unity

If the issue persists, please check the console of VS Code (not Unity!). If the .NET Framework 4.7.1 (Developer Pack) is mentioned there, download and install it from the official Microsoft website. Make sure that you install this exact version. Other versions do not work.

If you use Linux or a Mac, download the latest stable MONO Framework.
https://www.mono-project.com/download/stable/


On August 3rd, 2023, the following article was posted on the official Microsoft webseite. Their new extension is still new and might not work well yet. However, if nothing else helped, you could test it.

Visual Studio (VS)

For some students, VS Code simply does not work well. In that case, install and use Visual Studio (Community Edition). Maybe due to a problem with Unity, some update or whatever.

Download VS and follow this instruction. That should work.

If you still experience problems with IntelliSense, maybe you’ll have to download the MS Build Tools. For further information, please refer to this thread, which was linked by Carlos.


Regarding the namespaces, go to Edit > Preferences > External Tools (in Unity) and click “Regenerate project files”.


Sometimes, Unity has got internal problems. If nothing helped, close Unity and your script editor. Go to your project folder and delete the Library folder. If you see a Temp folder, delete it too. If you use Visual Studio, also delete the *.csproj and *.sln files. Start Unity again. Don’t panic if you see an empty scene. That’s Unity’s default scene. Open your own scene in the Assets folder. Now everything should be working.

Privacy & Terms