I have two WCF service applications which pass Data Transfer Objects between each other to perform certain actions. I have moved the DataContracts to a Common project as this seems like the logical thing to do, but I am having problems adding a service reference to one of the WCF service applications. I'm getting 4 similar errors for different parts of the service (contract, service etc):
Custom tool warning: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: Referenced type 'ServiceLibraryName.Common.Data.LicenceForm, Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' with data contract name 'LicenceForm' in namespace 'http://schemas.datacontract.org/2004/07/ServiceLibraryName.Common.Data' cannot be used since it does not match imported DataContract. Need to exclude this type from referenced types. XPath to Error Source: //wsdl:definitions[@targetNamespace='http://schemas.datacontract.org/2004/07/ServiceLibraryName.Common.Data']/wsdl:portType[@name='ILicenceGeneration'] C:\SourceCode\Release 2 \ServiceLibraryName\Sharepoint\Service References\LicenceGenerationCrm\Reference.svcmap 1 1 Sharepoint
I am certain that the referenced file assembly is the same file on both service and consumer, but I can do nothing to get rid of this message. Reuse assemblies in the Service Reference Configuration is checked.
Using SVCUtil and referencing the assembly also produces the same error.
Any ideas or suggestions would be welcome.