如何正确停止运行 dotnet core web 应用程序? [英] How to properly stop running dotnet core web application?

查看:190
本文介绍了如何正确停止运行 dotnet core web 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Windows 上的 Visual Studio 2017 和 2019 中,我在 包管理器控制台 中运行 dotnet watch run.它为 dotnet 核心应用程序启动了 kestrel,自动禁用了控制台中的文本编辑,并显示了一个红色按钮以停止命令执行,但该按钮不执行任何操作.此外,该消息显示为使用 Ctrl+C 但它也不起作用.

In Visual Studio 2017 and 2019 on Windows, I run dotnet watch run in the Package Manager Console. It launched kestrel for a dotnet core app, automatically disabled text edit in the console, and displayed a red button to stop command execution, but the button doesn't do anything. Also, the message is being displayed to use Ctrl+C but it doesn't work either.

Now listening on: http://localhost:20436 Application started. Press Ctrl+C to shut down.

现在,当我尝试在 Visual Studio 中启动 Web 应用程序时出现错误,因为它已经在运行.我找不到像 dotnet stop 这样的命令,只有 Ctrl+C 在这种情况下不起作用.我使用 Process Hacker 杀死了 dotnet.exe 进程,但这似乎不对.杀死正在运行的进程的最佳方法是什么?

Now there is an error when I try to launch the web app in Visual Studio because it is already running. I couldn't find a command like dotnet stop only Ctrl+C which doesn't work in this case. I used Process Hacker to kill the dotnet.exe process but that doesn't seem right. What would be the best way to kill the running process?

推荐答案

在项目名称旁边的那个部分的清除按钮旁边有一个红色按钮.我刚找到它,哈哈,我会在黄色圆圈后面给你看一张图片.我也在尝试 ctrl+c LOL

There is a red button next to the clear button in that section next to the project name. I just found it LOL I will show you a picture follow the yellow circle. I was trying ctrl+c too LOL

这篇关于如何正确停止运行 dotnet core web 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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