dotnet is not recognized as the name of a cmdlet

ぐ巨炮叔叔 提交于 2019-12-05 01:23:26

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.

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.

This error also occurs if .Net core is not installed on your machine. To verify it, please run the comman dotnet --help from Windows powershell or VS Code terminal. If .Net core is installed then you will see the output else same error. If you see the same error then:

  • Please install it from here https://dotnet.microsoft.com/download.
  • Then close whatever CLI or Code editor you are using like VS Code.
  • Now open them again, run your command (dotnet new webApp -o aspnetcoreapp) and you will get rid of your problem.
dannboy

In my case the issue had to do with the x64 vs. x86 discrepancy.
My path had x86 in it. I manually changed it to "Program Files" rather than "Program Files (x86) and it started working again.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!