Monobehaviour and using UnityEngine not recognized when I made a class through Unity project editor

every script I create works well but when I compile it, there isn’t suggestions or compile errors, as if visual studio not recognize the Monobehaviour, in fact it isn’t colored with the normal class color.

But if I add a class through Visual Studio editor the monobehaviour class is recognized
If you can help me, I’d appreciate so much. Thanks.

Hi there,
I had the same problem, Close the solution explorer window in visual studio and then close visual studio and run it again, open the solution explorer again. Problem should be solved. It is interesting but solved my problem.