I am really stuck up in a situation and will try to explain it in parts.
1: I have a WCF Class library project having some services.
2: I have a Class library project.
3: I have a Web Site consuming the class library project.
4: The Class library has a service reference from WCF class library project and same WCF refrence is added to Web site as well
5: When i build the website the following error comes up.
Error 1113 Reference.svcmap: Failed to generate code for the service reference 'VPServices'. Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: List of referenced types contains more than one type with data contract name 'VpResponseData' in namespace 'http://schemas.datacontract.org/2004/07/VPExternalCalls.CoreApi.MessageDefinitions'. Need to exclude all but one of the following types. Only matching types can be valid references:
"WebApplication.Helpers.Class.ResponseData, WebApplication.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" (matching) "VPExternalCalls.CoreApi.MessageDefinitions.VpResponseData, VPExternalCalls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=559d4289d6c6d138" (matching) XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IVPServices'] Cannot import wsdl:binding Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on. XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IVPServices'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IVPServices'] Cannot import wsdl:port Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IVPServices'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='VPServices']/wsdl:port[@name='BasicHttpBinding_IVPServices'] App_WebReferences/VPServices/