Tuesday, June 7, 2011

Update Service Reference for a Silverlight Application

Updating the service reference for a silverlight application sometimes throws an error

Custom tool error: Failed to generate code for the service reference...


and it also deletes the content in ServiceReference.ClientConfig file.


Solution steps.

1. Right click on the Referred WCF service under Service References
2. Select "Configure Service References..."
3. Uncheck "Reuse Types in referenced assemblies" checkbox
4. Restores the content in ServiceReference.ClientConfig