How to add WCF service reference in Visual Studio

2019-05-20 06:58发布

问题:

What do I need to allow Visual Studio 2005 to add WCF service reference to a project?

I know I should just use Visual Studio 2008, but I'm preparing for a "what-if" situation where the client does not have VS2008 just yet.

回答1:

If you want visual studio 2005 integration they have to have at least .net 3.0 installed. The client can then use svcutil.exe to generate the proxy.

Take a look here on how to use WCF in VS 2005 using the orcas extensions:
http://www.15seconds.com/issue/061130.htm

Alternatively:
From what I can tell MS never released a final WCF add in for VS2005, but the final CTP is still out there: http://downloads.zdnet.co.uk/0,1000000375,39328336s,00.htm

You can use that WCF add in instead of the more general and more beta orcas extension that is mentioned in the 15 seconds article. I believe the CTP will give you the "add service reference" option.



回答2:

In this case, I think your best bet is probably to provide the already-generated proxy class(es) to the client.



回答3:

The following is a post that will walk you through all the necessary to create a WCF service in Visual Studio 2005 including how to add necessary references:

http://tyblog.in/