error CS0246: The type or namespace name 'TMPro' could not be found (are you missing a using directive or an assembly reference?)

I have not asked any questions to the forum before but this problem has been to much. When I use TextMeshProUGUI in script it uses namespace TMPro in Visual Studio Community 2019.

When I go back to Unity 2020.1.8, it doesn’t recognize the namespace with the above error message.

I use TextMeshPro 3.01. I have looked for a solution in 3 days. I tried to move TextMeshPro into my project but then TextMeshPro was damaged with no scripts in folder so I had to reinstall Unity 2020.1.8. I don’t know now how to get this working.

I solved the problem now by adding assembly script in my script folder referencing Unity.TextMeshPro namespace.

I solved it by adding

using TMPro;

Then to get the component: