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.

can use dotnet in command but cannot be located in vscode on mac os

See original GitHub issue

image

sorry my english is not good.so i upload a pic to show my probleam. the point is .i update to the new .net core sdk. i add to the PATH .and i can use dotnet new dotnet restore dotnet run in the command. but when i open the project in vscode. the cli tools cannot be located error happen.

Environment data

dotnet --info output: bash-3.2$ dotnet --info .NET Command Line Tools (1.0.0-preview3-003180)

Product Information: Version: 1.0.0-preview3-003180 Commit SHA-1 hash: d4193cd5c1

Runtime Environment: OS Name: Mac OS X OS Version: 10.11 OS Platform: Darwin RID: osx.10.11-x64 bash-3.2$ dotnet run Project hello (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation. Hello World!

Console

//Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:88 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.e.doShow @ //Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:88

I tried above .but not solved. use command+P.and enter >Download .Net core Debugger likes nothing hanppen . the console also have no error message.

Append

image i can use dotnet restore in command. but when i use Command+p and enter >dotnet restore then “/bin/sh”

image

image

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:26 (2 by maintainers)

github_iconTop GitHub Comments

27reactions
tonyferreiracommented, Jul 15, 2016

Try closing vscode completely and then restarting it. If you updated the CLI tools while vscode was open, vscode likely did not load the updated $PATH environment variable.

26reactions
blackdwarfcommented, Jul 18, 2016

@yuzd I just tried it but I exited VS Code with Cmd-Q (or Code -> Quit VS Code from the menu bar). After restarting VS Code it actually worked. Can you try that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet: command not found in Mac
So I downloaded NET Core 2.1 SDK for mac and installed it. But when I run the dotnet command from terminal it throws...
Read more >
Install .NET on macOS
In this article, you'll learn how to install .NET on macOS. .NET is made up of the runtime and the SDK. The runtime...
Read more >
My vs code cant find the .NET Core SDK but I can run ...
My vs code cant find the .NET Core SDK but I can run the dotnet command in the vscode terminal ... If you...
Read more >
.NET and Visual Studio Code
.NET provides a fast and modular platform for creating many different types of applications that run on Windows, Linux, and macOS. Use Visual...
Read more >
Set up a .NET Core C# Development Environment on macOS
. NET Core is a cross-platform development and runtime environment, ... to learn how to develop software using C# and you have little...
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