当启动应用程序是控制台应用程序时,防止 iisexpress 在解决方案中运行网站 [英] Prevent iisexpress from running the websites in a solution when the startup app is a console app
问题描述
我有一个包含多个项目的解决方案.即使我将 Web 项目的启动选项设置为:
I have a solution with a number of projects in it. Even if I set the web project's start options to:
- 不要打开页面.等待来自外部应用程序的请求.
- 使用自定义网络服务器.基本 URL:
http://localhost
.
和启动项目:
- 单个启动项目
- 选择控制台应用程序(不是网站)
当我按下开始调试时,IIS express 启动(显示在任务栏上).如何防止 IIS Express 启动?我只运行控制台应用程序,不想运行 IIS Express.
When I press start debugging, IIS express launches (shows up on the taskbar). How do I prevent from IIS Express from launching? I am only running a console application, and don't want IIS Express running.
事实上,解决方案中的所有网站都在 IIS 中启动,它们不必要地消耗了我机器上的资源.
In fact, all of the websites in the solution launch in IIS, and they consume resources on my machine unnecessarily.
推荐答案
有一个简单的方法可以做到这一点:在 web 项目的属性 F4(不是右键单击-> 属性)中将调试时始终启动"设置为 false
There's easy way to do this: in web project's properties F4 (NOT right click-> properties) set "always start when debugging" to false
这篇关于当启动应用程序是控制台应用程序时,防止 iisexpress 在解决方案中运行网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!