'TMPro' could not be found in unity editor

OS: Windows 10 22H2 19045.5487
unity: 6000.0.32f1
visual studio: Microsoft Visual Studio Community 2022 17.12.3

I added a TextMeshPro component to my scene ( a automatic pop-up dialog box prompted me that something must be imported, and I had finished the importing action successfully )


add I added a script named “ConsoleInputHandler.cs” to handle the message

I used visual studio as IDE, just like


I added a member variable whose type is “TextMeshPro” then visual studio gave a suggestion to “using TMPro”.
I accepted the suggestion and added the line.

So there is no more compiling errors in visual studio.
But when I switched back to the unity editor, I got some errors

the detail is “Assets\Scripts\ConsoleInputHandler.cs(1,7): error CS0246: The type or namespace name ‘TMPro’ could not be found (are you missing a using directive or an assembly reference?)”

Is it a bug or is there any way easily to workaround? I’m curious why it happened, and I wish someone could explain some basic compiling design and knowledge briefly, provide several keywords and I will try to learn them

Are you using assembly definitions? If so, you’re probably just missing the reference to the Text Mesh Pro assembly

Yes, I found a assembly file for unity.logging which is added previously based on the following unity.logging document
https://docs.unity3d.com/Packages/com.unity.logging@1.3/manual/getting-started.html

Then I deleted the assembly file and there no errors any more.

Great thanks for you!