Srinivas
Srinivas

Reputation: 1063

Add a WCF Service Reference from another project

I am working on a WPF project in Visual Studio 2010. I want to import a WCF service reference from another project to this project.

I tried to do it manually by copying and pasting it, Visual Studio did not recognize it as a service reference. Instead it got added like just another folder.

Is there any other way to import a service reference?

Upvotes: 1

Views: 2527

Answers (1)

Stefan P.
Stefan P.

Reputation: 9519

Run the WCF service on your local IIS, add the WCF reference in your project from localhost/yourWCF. You can make in the config file an app setting key that points to the real WCF address, on app start, you can add a compile condition that overrides the localhost url with the real address if you'r running on release mode.

Upvotes: 1

Related Questions