views:

165

answers:

2

A Visual Studio 2008 project in one solution needs to reference a WCF service in another VS 2008 solution on the same development machine. Does anybody have any suggestions on how best to accomplish this?

+1  A: 

Host the service, and then use the URI of the hosted service in the other project to have VS create a proxy for you.

Here's a step by step article on how to add a reference. And here's an article that teaches you how to host a service in VS (which is probably the simplest thing to do while developing). I'd recommend you host your service in IIS, however, even during development.

Esteban Araya
+1  A: 

Right click the WCF solution in the other VS, and click Debug -> Start, that should get the WCF to show up in the system tray. Then, in the VS you want to add the service to, add the service reference.

If you want to be able to step-into the WCF code for debugging, in the menu open Debug -> Attach Tread. Then scroll down the list until you see the WCF service running in your other VS.

Dylan