When using VS Code I get this error message "The NET Core SDK cannot be located..."

Apologies if this is not the correct forum to make this post.

Whenever I open Visual Studio Code I get the pop up message shown in the lower right side of this screenshot here: .NET SDK - Image on Pasteboard

I’ve installed and reinstalled Visual Studio Code and the .NET Core SDK numerous times and I have no idea how to go about making sure the SDK is “on path”. I’m not sure what that means? I’ve looked online and other people have had the same issue but the solutions don’t really make much sense to me at all.

I’m just wondering if anyone could give me some help with the issue as it’s really annoying me…

Thanks

EDIT: I am updating this with my latest set of notes.

This may help you with intellisense and possibly other Visual Studio integration problems:

Sometimes the fix is as simple as doing Assets → Open C# Project from Unity. Other times it requires more.

Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.

Barring all that, move on to other ideas:

Also, try update the package inside of Unity: Window → Package Manager → Search for Visual Studio Editor → Press the Update button

Depending on flavor and version of Visual Studio, it may also have an installation step that you perform within the actual Visual Studio. This step seems finicky at best and may require multiple openings of VS before it comes up.

Update: The VSCode extension has been deprecated and abandoned:

Update: the VSCode integration is back… maybe!?

There may be a community fork available that is receiving updates.

https://github.com/Chizaruu/com.tsk.ide.vscode

Also, this: No suggestions in Vscode

Recently (July 2023) I worked on a Windows11 system that required a Microsoft component to be installed from within Visual Studio before it would work properly with all the OTHER software installed under Unity. I have no documentation on that process as I have only seen it once and it surprised me as well.

I’ve tried to update VS Code by following your instructions but the update button is greyed out as you can see here: https://ibb.co/b7cBbxF

Which suggests to me that it is up to date. Would you recommend me to uninstall and reinstall via the package manager? I’ve only uninstalled and reinstalled outside of the package manager up to this point…

I’ve completely uninstalled VS Code from my system and I installed it again via the package manager.

However when I go to make my default editor by going to preferences>external tools I can’t find VS Code in either the External Script Editor drop down box nor in the Image Application box…

Nevermind I fixed the issue. I just reinstalled everything from scratch… Cheers for the help :slight_smile:

i still have this error but i deleted .csproj file content and it started work, i can ignore the error now:)

Necro’ing this, but I just started getting this error again after VS Code (actually VSCodium) started getting this error again after an update (and searching brought me here). I had to update “Visual Studio Code Editor” package in Unity (hit the Unlock button up top to enable updating), AND then regenerate the project file in Unity (Edit → Preferences → External Tools → Regenerate project files.