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. dotnet command does not run in VSCode but does in external cmd

See original GitHub issue

Environment data

dotnet --info output: 2.1.500 VS Code version: 1.29.1 C# Extension version: 1.17.1

Steps to reproduce

Already have VS Code installed, previously used more for Javascript work. Also have .net framework sdk 4.5.1 and 4.6 installed. Install .net core x64 2.1.500. Already had C# extension installed. Try dotnet new command. Dotnet not recognized with internal powershell or cmd. Re-installed c# extension. Re-installed .net core

Expected behavior

For the dotnet command to work on the internal terminal in both cmd and powershell. Also for .net core debugging to be enabled and working.

Actual behavior

dotnet command is not recognized inside VS Code, yet it is on external cmd. Always get the error in VS code that .net CLI tools cannot be located

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
joe-fentoncommented, Dec 4, 2018

Yeah, that was it. I just restarted the computer and it is now working fine! Didn’t even think of it these days. Sorry to waste your time!

1reaction
gregg-miskellycommented, Dec 3, 2018

I don’t see anything about your path that looks particularly unusual.

Have you installed the .NET Core SDK recently? (ex: since the last time you rebooted) I have occasionally seen some folks complain about path settings not updating after installing the .NET Core SDK.

If that isn’t it, can you compare that path to the path you have in the VS Code integrated terminal in case that sparks any ideas?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code error - 'dotnet' is not recognized as an ...
After repair, I just typed dotnet --version at the cmd prompt and got the version displayed. My environment is Windows 10 on AMD64...
Read more >
Troubleshoot .NET tool usage issues - Microsoft Learn
Could not execute because the specified command or file was not found. Possible reasons for this include: * You misspelled a built-in dotnet ......
Read more >
Troubleshoot Terminal launch failures - Visual Studio Code
Try running your designated integrated terminal shell outside VS Code from an external terminal or command prompt.
Read more >
.NET and Visual Studio Code
Initialize a C# project: Open a terminal/command prompt and navigate to the folder in which you'd like to create the app. · When...
Read more >
Create a Dev Container - Visual Studio Code
This container can be used to run an application or to separate tools, ... but you may not need to prefix commands with...
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