views:

160

answers:

3

I've got a solution with WinForms and an ASP.NET application.

My startup project is WinForms but every time I run the project it starts the ASP.NET Webserver even though I don't want to use it.

I looked into everywhere in "Property Pages" and couldn't find an option to stop this. Also it's not possible to unload the project without removing it from the solution.

A: 

You might want to check the Startup Projects settings (right-click Solution --> Set Startup Projects) and make sure that the the web project isn't set to start when debugging. I'm using my Mac laptop right now, so I can't check whether this keeps the web server from starting up or not.

tvanfosson
Check that one, my settings set to only one project, so should be OK. Good point though I didn't know such a thing was exist.
dr. evil
In my solution there is a single startup project defined which is *not* the web project. Still the ASP web server gets started when debugging. The same happens with WCF services. Very strange...
0xA3
@divo that's exact problem I'm having, indeed strange behaviour.
dr. evil
A: 

Why not create different solutions? One for the WinForm application and the other one for the ASP.NET application. That has various advantages: - You work with a specific solution or view of your code-base that does not include the projects that you don't need. - Speed up your local build.

Mehmet Aras
But also I'm using same DLLs so there so many disadvantages of working with separate solutions as documented in here : http://msdn.microsoft.com/en-us/library/ms998208.aspx
dr. evil
There usually are and that's why you need to weigh the pros and cons. I work on a development project that has over 40 projects with different applications: WinForm, web, console, setup, etc. There is a single solution for the build automation that includes each and every project. However, for development purposes, we have partitioned solutions so that a developer works on just the projects she needs without having to deal with the unrelated projects. So far, 2 years, this has been working great for us.
Mehmet Aras
+2  A: 

Far from ideal, but if you change the properties under start options of the WebSite project from "Use default web server" to "Use custom server" and set the base URL as "http://localhost/" it will no longer load the development server when you debug the windows application.

Unfortunately you'll need to set this back when you want to debug the web site...

Martin Harris
yeah but that's good enough for me, unless someone can tell me a better way this is the best solution.
dr. evil
Thanks, that's already helping a lot.
0xA3