VS Code: "The .NET CLI tools cannot be located." - How To Disable?

Hi,

We just started using Unity and are using Visual Studio Code for code editing in Unity.
Every time we open Visual Studio Code we get the following error message:
“The .NET CLI tools cannot be located. .NET Core debugging will not be enabled. Make sure .NET CLI tools are installed and are on the path.”

How can we disable this error message in Visual Studio Code?
(we don’t want to install .NET CLI tools)

Thanks!

2 Likes

Hi,

We found how to disable above error in VS Code:

  • File/Preferences/User Settings
  • Add: ““csharp.suppressDotnetInstallWarning”: true,” to “settings.json” file that opens

Thanks!

3 Likes

Hey Thanks, i was looking about this :slight_smile:

Just tried your solution - syntax didn’t work. This is what worked for me:

"csharp.suppressDotnetInstallWarning": true,
4 Likes

Awesome - many thanks for this!

Been seeing this from another user on slack… it’s a weird issue and not even sure why it’s looking for the CLI tools. It appears to happen when opening the IDE FROM Unity (on a *nix system, including Mac). It affects not just VS Code but also Rider… however, running a dotnet --help in Rider will display the help settings so the CLI is being found just fine.

The solution seemed to be to use Rider instead of VS Code and open the solution directly from Rider. Using the above mentioned method also suppresses the warnings but seems to break Intellisense.

I got it only when I switch from the legacy C# to the latest C#

I’m sure there is some benefit but not seen it just yet…

works fine thankys