Blazor Server应用程序:可以在Visual Studio上继续运行服务器

发布于 2025-02-05 03:42:49 字数 156 浏览 1 评论 0 原文

当该应用在Visual Studio上午餐时,服务器启动并启动了浏览器。 关闭浏览器后,调试会话已关闭,并且服务器突然停止。

Visual Studio中有没有办法使服务器在所有浏览器关闭中保持运行?

(服务器与各种设备建立了TCP连接,我想看看它的行为没有客户端)

When the app is lunched on Visual Studio the server starts and the browser is launched.
When the browser is closed the debug session is closed and the server is stopped abruptly.

Is there a way in Visual Studio to keep the server running with all the browsers closed?

(the server establish TCP connections with various devices and I would like to see how it behaves with no clients)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

关于从前 2025-02-12 03:42:49

可以使用命令行 dotnet run

我通常将命令脚本添加到我的项目中 dotnet Watch 该应用程序以热重加载模式运行。即使VS关闭,这将继续运行,如果您更改源代码,并且会更新或重建。

更多信息:

Any .NET (core/5/6) app can be run using the command line dotnet run

I typically have a command script added to my projects that calls dotnet watch so that the app runs in hot reload mode. This will continue to run even if VS is closed down, and will update or rebuild if you alter the source code.

More information:https://learn.microsoft.com/en-us/aspnet/core/test/hot-reload?view=aspnetcore-6.0

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文