I have a solution with a few different projects in it: a couple dll projects, a console project, and a couple WCF projects.
我有一个包含几个不同项目的解决方案:几个dll项目,一个控制台项目和几个WCF项目。
The console project uses a dll from one of the projects, but I have VS set so that the console project has no dependencies. However, when I debug the console project VS launches, or builds all my projects. This is just a pain since both the WCF projects compile and launch the WCF client or the asp.net dev IIS process. Is there a way to prevent this behavior?
控制台项目使用其中一个项目的DLL,但我设置了VS,以便控制台项目没有依赖项。但是,当我调试控制台项目VS启动或构建我的所有项目时。这只是一个痛苦,因为WCF项目都编译并启动了WCF客户端或asp.net开发IIS进程。有没有办法防止这种行为?
EDIT: I have semi fixed it. To prevent the WCF library from launching, I followed this: How to Prevent Visual Studio launch WcfSvcHost.exe in Debuggin?
编辑:我已经半修复了。为了防止WCF库启动,我遵循以下内容:如何防止Visual Studio在Debuggin中启动WcfSvcHost.exe?
But I still cant stop the asp.net dev server from launching.
但我仍然无法阻止asp.net dev服务器启动。
4 个解决方案
#1
Right click on your solution, then go to Properties, Configuration Properties and select the projects you want to be compiled.
右键单击您的解决方案,然后转到“属性”,“配置属性”并选择要编译的项目。
#2
You might try checking what Visual Studio builds when running a project. Open the Options dialog, and go to Projects and Solutions | Build and Run. Try turning on "Only build startup projects and dependencies on Run".
您可以尝试检查Visual Studio在运行项目时构建的内容。打开“选项”对话框,然后转到“项目和解决方案”|构建并运行。尝试启用“仅在运行时构建启动项目和依赖项”。
#3
To stop the ASP.Net dev server from launching:
停止ASP.Net dev服务器启动:
Simply click the web project in the solution explorer and hit F4 to bring up the properties window, and change "Always start when debugging" from "True" to "False". You might need to check all the projects in the solution.
只需单击解决方案资源管理器中的Web项目,然后按F4打开属性窗口,并将“调试时始终启动”从“True”更改为“False”。您可能需要检查解决方案中的所有项目。
See this thread for more on this.
有关详细信息,请参阅此主题。
#4
Just Unload The Project, Right Click Project -> Unload Project
只需卸载项目,右键单击项目 - >卸载项目
#1
Right click on your solution, then go to Properties, Configuration Properties and select the projects you want to be compiled.
右键单击您的解决方案,然后转到“属性”,“配置属性”并选择要编译的项目。
#2
You might try checking what Visual Studio builds when running a project. Open the Options dialog, and go to Projects and Solutions | Build and Run. Try turning on "Only build startup projects and dependencies on Run".
您可以尝试检查Visual Studio在运行项目时构建的内容。打开“选项”对话框,然后转到“项目和解决方案”|构建并运行。尝试启用“仅在运行时构建启动项目和依赖项”。
#3
To stop the ASP.Net dev server from launching:
停止ASP.Net dev服务器启动:
Simply click the web project in the solution explorer and hit F4 to bring up the properties window, and change "Always start when debugging" from "True" to "False". You might need to check all the projects in the solution.
只需单击解决方案资源管理器中的Web项目,然后按F4打开属性窗口,并将“调试时始终启动”从“True”更改为“False”。您可能需要检查解决方案中的所有项目。
See this thread for more on this.
有关详细信息,请参阅此主题。
#4
Just Unload The Project, Right Click Project -> Unload Project
只需卸载项目,右键单击项目 - >卸载项目