79831954

Date: 2025-11-27 17:13:10
Score: 2
Natty:
Report link

Various suggestions and solutions from users/programmers all point to a likely folder corruption due to the sudden PC reboot. However, I've never been entirely convinced by two things:

1: Because the classes weren't recognized when building a project in another directory.

2: because of the following error:

Error while loading [...]: Exception thrown: System.TimeoutException: The operation has timed out.

And it was precisely this last error that prompted me to investigate further within VS Code. In fact, the compiler was trying to establish a connection with the "LSP" (I assume the acronym for Language Service Protocol), but was unsuccessful.

Searching for "Omnisharp" in the VS Code settings search engine, I came across the following option:

Omnisharp Setting

Which was disabled (perhaps because of the sudden PC reboot?). By enabling it, VS Code finally recognized the Unity classes.

VS Code now recognizes classes

I hope this helps other users, please make changes with caution!

Reasons:
  • Whitelisted phrase (-1): hope this helps
  • RegEx Blacklisted phrase (1): I hope this helps other users, please
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Alexander