I have a console app and WCF service app in a solution. I’d like to call the WCF app from the console app. I added a service reference to the console app project and tried to reference the service but its namespace is not found. I’m using VS 2010. Any ideas what I’m doing wrong?
Share
When you add a Service Reference, it’s not the same as an Assembly Reference.
When you can add a Service Reference, you don’t necessarily know the inner details of the service. In many cases it won’t be your service, it will be another company’s. A service reference just defines the contracts.
So you won’t find your service using the namespaces or objects you declared on the service side. Rather, your client is actually defining client-side objects of its own based on the contracts. When you added the reference, you could choose the namespace to add it to.
In Visual Studio, click on your client project in the Solution Explorer and enable the “Show All Files” option. Then you should be able to navigate through the Service Reference and find the hidden files auto-generated the by the Add Service Reference wizard. You will see which namespace it’s declared in by inspecting those files.