Mac user here (Ventura 13.5.2), using Unity versions 2019.4.29 and 2020.3.43. Has anyone experienced VSCode being unable to find the .NET SDK installation after opening a second Unity project? Everything works perfectly fine in the first project, but when I open a second one, suddenly the IntelliSense stops working and errors aren’t being detected. I’ve tried regenerating the .csproj files, re-running dotnet restore, and refreshing the problematic window countless times. The only difference I’ve noticed in the C# Dev Kit logs is that the working window uses the preinstalled .NET runtime whereas the problematic one uses a local runtime.
Here’s the output I get when I run dotnet --info:
Extensions:
C# v2.7.25
C# Dev Kit v1.0.4
Unity v0.9.2
.NET Runtime Install Tool v1.8.1
Update: I ran the three commands below at the command palette and the “Projects” number is stuck at the loading icon.
VSCode integration with Unity is finicky at best, and this goes for VSCode in general too because it depends so heavily on numerous plugins in combination with .Net and Unity versions (means: combinatory explosion of potential compatibility issues).
I keep recommending to absolutely NOT use VSCode if you value your time. VSCommunity is available on Mac too.
Visual Studio for Mac is going away next year, it’s not a viable long-term solution.
If using the preview Unity extension developed by Microsoft, it would be best to flag them to try and get things fixed for everyone (report them in Visual Studio Code as described here ).
Hi @asaste0610 , yes we are aware of this. After investigating, we were able to link this behavior to a PATH expansion bug when VSCode creates subprocesses on macOS.
Thanks for pointing me towards an issue tracker – a couple of my colleagues have been dealing with the same problem. It’s not a huge inconvenience but very frustrating to constantly quit out of VSCode to navigate between projects.