user5620123
user5620123

Reputation: 55

Cannot update Service Reference

I added some new public methods to my webservice project on Visual Studio 2017, and am trying to get them to show up when calling the new methods for my Windows Form Application. It looks like the usual answer is to right-click on Servicereferences1.svc, then choose "Update References", but I cannot find Servicereferences1.svc in my Properties window? Is there any other location where this may be located?

Upvotes: 0

Views: 3993

Answers (2)

BipinR
BipinR

Reputation: 493

The WCF Service reference is under Service References folder in the project. Service Reference Folder

If the new method you added is not updated. The the below and see if that helps.

  1. Right click the Service from the Service Reference folder and Choose Configure Service Reference, uncheck Reuse types in referenced assemblies checkbox and click Ok. Now right click the reference and try the update service reference again. right Click Configure Service Reference Configure Service Reference Window
  2. Remove the service reference clean the solution and add the service reference again.

Upvotes: 1

Shaun Kiesewetter
Shaun Kiesewetter

Reputation: 21

It is really must better to reference the contract directly, and create your own proxy.

That said: What is happening now is that your service is being hosted in IIS, and your development environment will query the running service for its contract so it can generate a proxy for you. That said even if your service code has changed, it must be the latest one running in your local IIS. (Check this ... that is probably what the issue is). Rebuild your service, and navigate to it in your browser, the updated definition should appear.

Upvotes: 0

Related Questions