"No MonoBehavior scripts in the file" on Every Script?

Hello,

I took a break from Unity, around 2 months long, and just recently started it up again. However, now every script in every project, including unmodified scripts from Package Manager, gives me the message “No MonoBehavior scripts in the file, or their names do not match the file name.” I have updated and reinstalled Unity, to no avail.

Current Unity Version: 2019.2.16f1 Personal
Screenshots:


Chances are you have a script whose class name does not match the file name.

Hi,

I tested this out by creating a sample project with the “3D With Extras” template and not modifying or creating anything, however the post processing scripts included in the template give the same message.


I forgot to mention also that when opening the scripts in Visual Studio they give no errors.

Update: Fixed it! Apparently I had 2 versions of Unity Hub installed at the same time. After I uninstalled one of them the problem fixed itself.

Update Again: Actually still doesn’t work. Deleting the other Unity Hub made the post processing in the 3D With Extras template work, but nothing else.

hey it’s been 4months,did you solve this? same problem here ;m;