can use dotnet in command but cannot be located in vscode on mac os
See original GitHub issuesorry 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
i can use dotnet restore in command. but when i use Command+p and enter >dotnet restore then “/bin/sh”
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:26 (2 by maintainers)
Top GitHub Comments
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.
@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?