Windows 上的 dotnet 命令可执行文件在哪里? [英] Where is the dotnet command executable located on Windows?

查看:62
本文介绍了Windows 上的 dotnet 命令可执行文件在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在探索新的 Entity Framework Core(不与 ASP.Net 结合使用,我正在编码的只是一个 WinForms 应用程序)并发现一些教程提到了创建所需的 dotnet 命令行命令迁徙".然而,当我尝试它时,它说 'dotnet' 不是内部或外部命令,也不是可运行的程序或批处理文件. 我在我的硬盘上搜索了dotnet.exe"、dotnet".bat"和dotnet.cmd",但一无所获.我使用 Visual Studio 2015 社区版.我在哪里可以找到这个命令可执行文件?我要向 %PATH% 环境变量添加什么才能使其工作?

I am exploring the new Entity Framework Core (NOT in conjunction with ASP.Net, what I am coding is just a WinForms app) and found some tutorials mentioning a dotnet command line command needed to create "migrations". When I try it, however, it says 'dotnet' is not recognized as an internal or external command, operable program or batch file. I have searched my hard drive for "dotnet.exe", "dotnet.bat" and "dotnet.cmd" but have found nothing. I use Visual Studio 2015 Community Edition. Where do I find this command executable? What am I to add to the %PATH% environment variable for it to work?

推荐答案

dotnet.exe 位于

dotnet.exe is located in

C:Program Filesdotnet>

如果您使用命令提示符并收到dotnet"未被识别为内部或外部命令、可运行程序或批处理文件的消息,则首先检查上述路径.如果您找到上述路径,则只需将其复制并将其设置为 PC 的环境变量.

If you are using command prompt and getting message that 'dotnet' is not recognized as an internal or external command, operable program or batch file" then first check the above path. If you found the above path then just copy it and set it as an environment variable of your PC.

步骤:

  1. 打开控制面板>系统和安全>系统

  1. Open control panel>System and Security>System

点击高级系统设置

在高级部分,点击环境变量

在系统变量中,选择路径并编辑

In System variables, select path and edit

分号后写C:Program Filesdotnet"

After semicolon, write "C:Program Filesdotnet"

点击确定按钮直到结束.

Click on Ok button till end.

现在检查它是否正常工作.只需打开命令提示符并输入

now to check whether its working on not. Just open command propmpt and type

dotnet --version

这将显示您 PC 中安装的 dotnet 版本.

This will show the dotnet version installed in your PC.

这篇关于Windows 上的 dotnet 命令可执行文件在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆