question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.NET CLI tools cannot be located (but are on path)

See original GitHub issue

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-003121)

Product Information: Version: 1.0.0-preview2-003121 Commit SHA-1 hash: 1e9d529bc5

Runtime Environment: OS Name: Mac OS X OS Version: 10.11 OS Platform: Darwin RID: osx.10.11-x64

VS Code version: version 1.3.0

C# Extension version: version 1.2.2

Steps to reproduce

  1. Install latest Visual Studio Code
  2. Install .NET CLI tools
  3. Confirm that .NET CLI tools are on path:

cat $PATH cat: /Library/Android/android-sdk-mac_x86/build-tools/21.1.1:/Library/Android/android-sdk-mac_x86/tools:/Library/Android/android-sdk-mac_x86/platform-tools:/Users/robert/.rbenv/plugins/ruby-build/bin:/Users/robert/.rbenv/shims:/Users/robert/.rbenv/bin:/Users/robert/Development/Go/bin:/Users/robert/Library/CustomCommands:/Library/Android/android-sdk-mac_x86/platform-tools:/Library/Android/android-sdk-mac_x86/tools:/Library/Android/android-sdk-mac_x86:/opt/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/share/dotnet:/Users/robert/.rvm/bin: No such file or directory

  1. Open C# project in VS Code

Expected behavior

C# plugin features should be enabled

Actual behavior

Error message indicates that .NET CLI tools cannot be located. screen shot 2016-07-10 at 5 49 40 pm

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
robertpeacock22commented, Jul 29, 2016

It appears that your PATH is not available to Finder/Dock-launched applications unless you explicitly set it up to be, as per http://apple.stackexchange.com/questions/51677/how-to-set-path-for-finder-launched-applications

Essentially you need to:

  1. Add launchctl setenv PATH $PATH to your .bash_profile or .bashrc
  2. Restart the Dock using osascript -e 'tell app "Dock" to quit' in order to make the changes take effect
  3. Restart Visual Studio Code
0reactions
robertpeacock22commented, Aug 1, 2016

@blackdwarf I’m using bash.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code error "The .NET CLI tools cannot be located..."
NET CLI tools cannot be located. .NET Core debugging will not be enabled. Make sure .NET CLI tools are installed and are on...
Read more >
Troubleshoot .NET tool usage issues - Microsoft Learn
If you're trying to run a global tool, check that the PATH environment variable on your machine contains the path where you installed...
Read more >
VS Code: "The .NET CLI tools cannot be located." - Unity Forum
NET CLI tools cannot be located. .NET Core debugging will not be enabled. Make sure .NET CLI tools are installed and are on...
Read more >
macOS dotnet CLI path for global tools is bad
Note that the httprepl tool can't be found in the PATH . This issue breaks the learning exercise at Exercise - Create a...
Read more >
11 Ways to Fix "The System Cannot Find The Path Specified ...
Once again, review the code you're running and see if there are any errors in the paths you've added. If there is an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found