我已经打开了一个窗口与我正在调试的网站。我不需要VS为我启动另一个每当我需要调试。
有没有办法阻止这种行为?
我已经打开了一个窗口与我正在调试的网站。我不需要VS为我启动另一个每当我需要调试。
有没有办法阻止这种行为?
当前回答
在Visual Studio 2019中,我解决了同样的问题:
去你的Visual Studio选项工具>>>选项>>>项目和解决方案>>> Web项目然后最后取消选项>>>停止调试器浏览器窗口关闭,关闭浏览器时调试停止
步骤1:
步骤2: >>>关闭调试器浏览器窗口,调试停止时关闭浏览器
步骤3:
最后点击>>> OK按钮,这些都是解决问题的步骤。
其他回答
虽然有几个很好的答案,从通常的怀疑到更新的解决方案,但我想再提供一个解决方案,以解决当您在多个项目中处理一个解决方案时应该做的事情。
在得到这个解决方案之前,我一直在应用程序主机中查看bindingInformation。配置解决方案,不知疲倦地寻找为什么事情不工作的任何线索。
事实证明,我忽略了一个简单的事情,那就是不同的项目也有各自的设置。 因此,除了Project > {Project- name}属性…> Web >开始行动在我的后端项目,我还必须去网站>开始选项…开始行动在我的Frontend项目。在那里,我选择了不要打开页面。等待来自外部应用程序的请求,从那时起就一直很快乐!
VS 15.7.1工具→选项→项目和解决方案→Web项目→取消勾选关闭浏览器窗口时停止调试器。
.NET核心Web Api项目的更新答案…
右键单击项目,选择“属性”,转到“调试”,取消“启动浏览器”复选框(默认启用)。
I looked over the answers and didn't see the solution I found mentioned. If it was, my apologies. In my case, currently using Visual Studio 2015. In the solution explorer, right click on the Project file and click properties. Go to the Debug tab and this should have info for how you're launching "IIS Express or Web(DNX)" for the first two drop downs, and then there should be a checkmark box for "Launch URL:". Uncheck this option and your browser won't be automatically launched everytime you go to debug your application. Hope this helps someone out.
在ASP中。Net 5项目现在可以为每个启动配置文件设置。
打开文件launchsettings。在Startup Project Properties文件夹下添加"launchBrowser": false到你正在配置的配置文件中,例如:
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": false,
"environmentVariables": {
"Hosting:Environment": "Development"
}
}
}