views:

245

answers:

1

I'm using Visual Studio 2008 and have a WCF client working against a WCF service. They are both located in the same Visual Studio solution. After I've made a change in my WCF contract, I want to update the service reference on the client so that changes made to the contract is also made in the proxy.

My problem is that the proxy code is not re-generated.

When I select to update the service reference, the following happens:

  1. A dialog with the title "Updating service reference 'name-of-reference'" is shown. This dialog has a progress bar.
  2. The progressbar moves and the status text in the dialog is changed to "Updating configuration"
  3. The progressbar moves a bit more, and the status text is chnaged to "Configuration update complete"

The dialog doesn't show the text "Generating \something\" (can't remember the exact wording) which I would expedct.

If I delete the service reference and add it again, the proxy is properly generated. I add the service using the exact same settings as before, so I don't think it's a issue I can solve by changing the service reference configuration on the client.

One thing I suspect may be the problem is that I've renamed the default wsHttpBindings in app.config. I've also renamed the default endpoints. The reason behind this is that I need more than one endpoint and having one named 'some-default-name' and one with my own name is just confusing.

The problem with deleting the service and adding it again is that Visual Studio adds a new binding in app.config (among other things) which should not be there.

Anyone seen this problem before? Anyone knows of a solution to it?

+1  A: 

When we have had this problem it has usually been one of these errors:

  • The size of the contract has increased, and is now so large that the WCF configuration does not allow it to be transferred.
  • A new class has been added to a WCF Interface and that class is not marked as serializable.
  • There is a compile error that stops the code from building and it therefore uses the old dll
Shiraz Bhaiji
Unfortunately none of those applies to me. When I delete the reference and add it again it works just fine. If the contract was so big or there were any errors int he WCF contract, it wouldn't work after the delete/add operation.
Nitramk