Reputation: 5480
I right clicked on the project and clicked on Add Service Reference
, In the dialog box I typed in the URL of the service and clicked on Go
.It successfully detected the service and it showed all the methods that the service contains. I gave it a sensible name in the Namespace and clicked on OK.
When I clicked on OK, it created a Service Reference folder with the newly created service.
The problem now is that when I try to create an instance of the Service Reference, It doesn't recognise it.
For example, if the service is called "MyService" and in the code behind I type:
MyService
- it doesn't recognise it. I tried to View in Object Browser
but I can't see it anywhere. I updated the Service successfully too by Right-Clicking and updating. The services work perfectly fine as I am using it other platforms.
The service is a WCF application.
Any ideas where I am going wrong?
Upvotes: 0
Views: 215
Reputation: 151
To consume the WCF service from windows phone 8 project on vs2013, I faced the same problem (Empty config client), and I could not create an instance of the client Service reference. The following worked for me:
1- Right-click on the referenced service under the folder ServiceRefernce. 2- Select Configure Service Reference in the menu to access Service Reference Settings. 3- Above the list of assemblies, Select "Reuse types in specified referenced assemblies:". 4- Check in the list "System.ServiceModel" and press OK.
I hope this will help.
Upvotes: 0
Reputation: 6424
I had this same problem using VS2010 to develop for WP7. It seemed to work ok, but the files were not actually generated. It didn't happen always, so my workaround was to create a new project in a new instance of Visual Studio, generate the ServiceReference, and copy the content of ServiceReferences directory from the new project to my project.
Upvotes: 1