Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TMPro not found in Visual Studio Code

I'm using Visual Studio Code to write my code for Unity. The following extension I've added to Visual Studio Code: C#, Debugger for Unity, Unity Code Snippets & Unity Tools

Using TMPro to work with TextMeshPro components throws me this error:

Unnecessary using directive. [Assembly-CSharp]csharp(CS8019)
The type or namespace name 'TMPro' could not be found (are you missing a using directive or an assembly reference?) [Assembly-CSharp, Assembly-CSharp, Assembly-CSharp, Assembly-CSharp, Assembly-CSharp, Assembly-CSharp, Assembly-CSharp]csharp(CS0246)

On the bright-side, in Unity Editor no errors are thrown, but it is still annoying.

Does anybody know if there's an additional Extension I have to download or how to fix this issue?

Best

like image 877
Spoon Avatar asked Jul 08 '26 17:07

Spoon


1 Answers

I have had this for ages, here is the solution for Unity 2021.1 and latest Vscode plugin:

Go to preferences>External tools and Untick everything (all generate csproj tickboxes) delete all the sln and CSproj files.

Hit Regenerate project files.

like image 114
Yossi2010 Avatar answered Jul 11 '26 08:07

Yossi2010