我已经打开了一个窗口与我正在调试的网站。我不需要VS为我启动另一个每当我需要调试。
有没有办法阻止这种行为?
我已经打开了一个窗口与我正在调试的网站。我不需要VS为我启动另一个每当我需要调试。
有没有办法阻止这种行为?
当前回答
这个变通方法对我来说适用于VS 2019
工具=>选项
然后在搜索框中键入项目和解决方案。
选择Web项目。
然后取消下面的选项。
关闭浏览器窗口时停止调试器,调试停止时关闭浏览器。
这对我很有用。希望这能有所帮助。
其他回答
.NET核心Web Api项目的更新答案…
右键单击项目,选择“属性”,转到“调试”,取消“启动浏览器”复选框(默认启用)。
CTRL+ALT+ENTER如果你的修正是前端
http://blogs.msdn.com/b/webdev/archive/2013/06/28/browser-link-feature-in-visual-studio-preview-2013.aspx
您现在还可以通过单击Run按钮旁边的下拉箭头来访问Web属性!
点击“运行”旁边的下拉按钮 {项目名称}属性 点击左侧列表中的“Web” 在“开始操作”段下,单击“不打开页面”。
你都准备好了!
PS:这对我来说是有效的,我使用的是VS Professional 2019的16.5.5版本:)
There seems to be one case in which none of the above but the following helps. I'm developing a project for Windows Azure cloud platform and I have a web role. There is indeed a radio button Don't open page in Project -> {Project name} properties... as was pointed out by Pawel Krakowiak, but it has no effect in my case whatsoever. However, there is the main cloud project in solution explorer and there is the Roles folder under it. If I right click my web role in this folder and choose Properties, I get another set of settings and on the Configuration tab there is the Launch browser for flag, after unchecking it a new browser window is not opened on application start up.
虽然有几个很好的答案,从通常的怀疑到更新的解决方案,但我想再提供一个解决方案,以解决当您在多个项目中处理一个解决方案时应该做的事情。
在得到这个解决方案之前,我一直在应用程序主机中查看bindingInformation。配置解决方案,不知疲倦地寻找为什么事情不工作的任何线索。
事实证明,我忽略了一个简单的事情,那就是不同的项目也有各自的设置。 因此,除了Project > {Project- name}属性…> Web >开始行动在我的后端项目,我还必须去网站>开始选项…开始行动在我的Frontend项目。在那里,我选择了不要打开页面。等待来自外部应用程序的请求,从那时起就一直很快乐!