Blazor Server应用程序:可以在Visual Studio上继续运行服务器
当该应用在Visual Studio上午餐时,服务器启动并启动了浏览器。 关闭浏览器后,调试会话已关闭,并且服务器突然停止。
Visual Studio中有没有办法使服务器在所有浏览器关闭中保持运行?
(服务器与各种设备建立了TCP连接,我想看看它的行为没有客户端)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以使用命令行
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