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
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.