当启动应用程序是控制台应用程序时,阻止iisexpress在解决方案中运行网站 [英] Prevent iisexpress from running the websites in a solution when the startup app is a console app

查看:139
本文介绍了当启动应用程序是控制台应用程序时,阻止iisexpress在解决方案中运行网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含多个项目的解决方案.即使我将Web项目的开始选项设置为:

I have a solution with a number of projects in it. Even if I set the web project's start options to:

  1. 不打开页面.等待来自外部应用程序的请求.
  2. 使用自定义Web服务器.基本网址:http://localhost.

启动项目将执行以下操作:

And the startup project to:

  1. 单个启动项目
  2. 选择控制台应用程序(不是网站)

当我按开始调试时,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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆