VSCode: Some projects have trouble loading. Please review the output for more details.

I’m using VS Code for editing the C# on Unity.

When I open a script in VS Code, the syntax highlights correctly, but I get absolutely no intellisense for Unity. I only get the following message that appears a minute after opening:

“Some projects have trouble loading. Please review the output for more details.”

According to the docs, this message appears for Apple users. I’m on Windows 10. Even still, I tried installing Monodevelop (which was the suggestion). No difference.

I’m pretty sure I followed all the setup instructions exactly; (Visual Studio Code and Unity) I have the latest version of the .NET framework installed, and I have access to the ‘dotnet’ command (it’s in my PATH).

The issue seems to be that the Assembly-CSharp.csproj / Assembly-CSharp-Editor.csproj files have the ‘TargetFrameworkVersion’ set to v4.7.1, but the latest version of the dotnet framework is v6.0.402. I tried changing the value in the csproj files, but that didn’t work either. Am I required to install v4.7.1 instead? Or is there a way it will work with version v6.0.402?

Or maybe there’s a different issue? I really have no idea. I’m not new to coding, but I am new to Unity. I followed the setup instructions, and it didn’t work. :-?

TIA!

Ok, so I think I figured it out.
It seems like the .NET SDK and the .NET framework are different things?

I had already installed the .NET SDK:

But I only got intellisense after I also installed the .NET framework 4.7.1:

(Still not exactly sure, but if someone knows more, feel free to pitch in for any other readers.)

If you installed both plugins and it now works, it’s all nice and Peachy, you know what they say, if it works, don’t ask why it works, just be glad it does.

(Still not exactly sure, but if someone knows more, feel free to pitch in for any other readers.)

I think it will serve you well to read a bit more about the .NET “Framework” and the SDK “software development kit” as time permits. It is always a benefit in the long-term to understand why you are doing what you do.

In can get a bit tricky to navigate the versioning but basically some features are introduced in each new version and if you need them you would need to install at least that version. I will also suggest that you look into at least trying out Visual Studio. I love VS Code and use it all the time but there is a free version of Visual Studio that integrates well with Unity and that might be worth a try at least.