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

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

问题描述

我正在探索新的Entity Framework Core(不与ASP.Net结合使用,我编码的只是WinForms应用程序),并且找到了一些教程,其中提到创建迁移"所需的dotnet命令行命令.但是,当我尝试它时,它说'dotnet' is not recognized as an internal or external command, operable program or batch file.我已经在硬盘上搜索了"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 Files\dotnet>

如果您正在使用命令提示符,并且收到消息"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 Files \ dotnet"

After semicolon, write "C:\Program Files\dotnet"

单击确定"按钮直至结束.

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天全站免登陆