简体   繁体   English

如何在 Visual Studio ASP.NET Core web 项目中的每次重建时使 Kestrel 控制台 window 自动关闭/重置?

[英]How to make Kestrel console window auto close/reset upon each rebuild in Visual Studio ASP.NET Core web projects?

I'm using VS 2019. By default most if not all of the ASP.NET Core web projects use IIS Express as the host under Debug settings and launchSettings.json . I'm using VS 2019. By default most if not all of the ASP.NET Core web projects use IIS Express as the host under Debug settings and launchSettings.json .

What I tend to do, especially for web API projects, is to delete the IIS Express profile and instead use the "Project" profile/launch option.我倾向于做的,特别是对于 web API 项目,是删除 IIS Express 配置文件,而是使用“项目”配置文件/启动选项。

This simply opens a Kestrel console window upon execution, and I like it how logs etc are shown in the same console for easy diagnostics.这只是在执行时打开一个 Kestrel 控制台 window,我喜欢日志等如何显示在同一个控制台中以便于诊断。

But the problem is, if any code is changed, and I re-build the solution/project (Ctrl+B, Ctrl+Shift+B,Ctrl + F5 etc etc), I get the "Could not copy..." messages in Visual Studio, till I manually close this Kestrel console window.但问题是,如果任何代码被更改,并且我重新构建解决方案/项目(Ctrl+B、Ctrl+Shift+B、Ctrl+F5 等),我会收到“无法复制...”消息在 Visual Studio 中,直到我手动关闭这个 Kestrel 控制台 window。

This is not an issue with the IIS Express profile at all.这根本不是 IIS Express 配置文件的问题。

So how do I make it such that I don't have to manually close that Kestrel window each rebuild?那么我该如何做到这一点,这样我就不必在每次重建时手动关闭 Kestrel window 呢? This seems like a natural/easy thing to do but I just can't find the options.这似乎是一件自然/容易的事情,但我就是找不到选项。

You mean this?你是这个意思?

Tools → Options → Debugging → General → Automatically close the console when debugging stops工具→选项→调试→常规→调试停止时自动关闭控制台

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Visual Studio 中以编程方式打开项目时自动关闭或隐藏此 asp.net 主页窗口 - How to Auto close or hide this asp.net home page window when opened the project in visual studio programmatically ASP.Net Kestrel无法从Visual Studio加载控制台,如何调试该问题? - ASP.Net Kestrel not loading up console from Visual Studio, how can I debug the issue? 在Visual Studio Code中调试多个ASP.NET Core项目 - Debug multiple ASP.NET Core projects in Visual Studio Code 如何在Visual Studio中测量ASP.NET Core项目中的代码覆盖率? - How to measure Code Coverage in ASP.NET Core projects in Visual Studio? Visual Studio-独立的Asp.net项目 - Visual studio - Separate asp.net projects 在使用 visual studio 2019 运行应用程序时,如何防止在 Asp.Net Core API 3.1 中自动生成 web.config? - How to prevent auto-generated web.config in Asp.Net Core API 3.1 while running the application using visual studio 2019? 如何在Visual Studio 2017 ASP.NET核心Web应用程序中集成Bootstrap 4? - How to integrate Bootstrap 4 in Visual Studio 2017 ASP.NET Core Web Application? 如何在不使用 Visual Studio 的情况下直接在 Dockers 容器上运行 ASP.NET Core Web 应用程序 - How to run an ASP.NET Core Web Application on Dockers container directly without using Visual Studio Kestrel on https with asp.net core 1.0 - Kestrel on https with asp.net core 1.0 记录asp.net core / kestrel中的异常 - Logging exceptions in asp.net core / kestrel
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM