dotnet is not recognized as the name of a cmdlet
This error also occurs if .Net Core is not installed on your machine. To verify it, please run the command dotnet --help
from Windows PowerShell or VS Code terminal. If .Net Core is installed then you will see the output, else the same error. If you see the same error then:
- Please download and install it from here.
- Then close the CLI or Code editor you are using.
Re-open it again, run the following command:
dotnet new webApp -o aspnetcoreapp
It will hopefully let you get rid of the problem.
After again coming across this problem, we found the answer here.
Open Programs and Features, choose Microsoft Visual C++ Redistributable (x86), click Uninstall and then choose Repair. After repairing it (and the x64 version if you have it), reinstall or repair the installation of the .NET Core SDK 1.0.1.
Also ensure that "C:\Program Files\dotnet"
is part of the "path" system environment variable.
After uninstalling previous SDK versions, it had disappeared from mine.