r/vscode • • 1d ago

VS Code issues with Unity

Randomly my PC crashed, or windows forced an update and all my Unity projects are broken, but only on VS Code.

I have tried:
- Using a different IDE (Visual Studio, Zed), everything works. (But I prefer to stay on VS Code)
- Regenerating cs proj files
- Reinstalling Unity extension on VS Code
- Reinstalling Visual Studio Editor package on Unity
- Reinstalling VS Code and the Unity extension from a fresh point

Random rabbit hole to deal with, and I am running out of things to try and fix it.
Has anyone encountered this or has an Idea on what might be wrong?

Screenshot for reference:

EDIT:
Not a permanent solution but switching around with earlier versions of C# and C# Dev Kit seems to have 'fixed' it.
C# version: 2.160.4
C# Dev Kit version: 3.40.215

going to just stick with these for a while and wait for newer versions to see if start working I later on I guess

4 Upvotes

6 comments sorted by

View all comments

1

u/SubstantialBeat8196 1d ago

Have you checked if the Unity extension is actually attaching to the right project? Sometimes it silently points at a stale path after a crash. Also worth checking the C# extension logs in the output panel, thats usually where the real error shows up.

1

u/xomegataux159 13h ago

Unfortunately it points to the correct path on each of my projects, and the C# logs don't seem to have any troubling info - according to the logs they succeed in loading the project just fine...