I am using Visual Studio 2010 and I am trying to create a solution containing an N tier architecture.
I have a project each for every tier
- Common
- DAL
- Business //
- Service // WCF
- ServiceHost
- Web
the projects are listed above are also called in the same order as well; so Web talks to Service tier, service tier talks to Business and business then talks to factory and factory project is responsible for talking to DB.
the issue I am having is to setup my projects in a way that before Web project is launched by pressing F5 - ServiceHost (which is just a self host console for WCF) should be started first so when Web calls for a service; it is up and running already.
Note: in PRD; Web and WCF will be hosted on different boxes altogether so this wont be an issue but for developing on Local machine - I need the above.
Interim Solution - I have excluded ServiceHost Project from the solution so it doesnt get launched with Web and I am running the ServiceHost executable externally from command line to get the Service up and running and then I am launching the Web project as normal using F5.
Can someone please tell me what do I have to do to achieve the above?