"Miscellaneous Files" Making Scripts Not Work

That unfortunately didn’t work for me, and the bug is still there. It appears to be an unresolved bug in Visual Studio (up to at least the 2017 release).

I’ve tried a bunch of the solutions people have posted, and the only one that seemed to fix it was to go to Project/Add Existing Item in Visual Studio and then select any .cs file in my project. That seemed to fix the “miscellaneous files” bug, not only for that one file but for all of them.
I hope this helps someone else who’s having this issue.