Saturday, June 26, 2010

WCF Client code is emtpy: Referenced type cannot be used since it does not match imported DataContract. Need to exclude this type from referenced type

Adding a WCF service to a web project ran successfully, but it didn't generate any client classes. I noticed a "silent" warning was generated in Visual Studio 2008 (mentioned in the title of the post), and in order to fix it, I did the following (from this link):

1) Click Advanced in the dialog shown while adding a Service Reference
2) Uncheck "Reuse types from referenced assemblies"

No comments: