我真的陷入了困境,并会尝试部分解释。
1:我有一个有一些服务的 WCF 类库项目。
2:我有一个类库项目。
3:我有一个使用类库项目的网站。
4:类库有来自 WCF 类库项目的服务引用,同样的 WCF 引用也添加到网站
5:当我建立网站时,出现以下错误。
错误 1113 Reference.svcmap:无法为服务引用“VPServices”生成代码。无法导入 wsdl:portType 详细信息:运行 WSDL 导入扩展时引发异常:System.ServiceModel.Description.DataContractSerializerMessageContractImporter 错误:引用类型列表包含多个类型,命名空间“http://”中的数据协定名称为“VpResponseData” schemas.datacontract.org/2004/07/VPExternalCalls.CoreApi.MessageDefinitions'。需要排除除以下类型之一之外的所有类型。只有匹配的类型可以是有效的引用:
“WebApplication.Helpers.Class.ResponseData,WebApplication.Helpers,版本=1.0.0.0,文化=中性,PublicKeyToken=null”(匹配)“VPExternalCalls.CoreApi.MessageDefinitions.VpResponseData,VPExternalCalls,版本=1.0.0.0,文化=中性, PublicKeyToken=559d4289d6c6d138" (匹配) XPath 到错误源: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IVPServices'] 无法导入 wsdl:binding详细信息:导入 wsdl:binding 所依赖的 wsdl:portType 时出错。wsdl:portType 的 XPath://wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:portType[@name='IVPServices'] 错误源的 XPath://wsdl:definitions[@ targetNamespace='http://tempuri.org/']/wsdl:binding[@name=' BasicHttpBinding_IVPServices'] 无法导入 wsdl:port 详细信息:导入 wsdl:port 所依赖的 wsdl:binding 时出错。wsdl:binding 的 XPath: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IVPServices'] 错误源的 XPath: //wsdl:definitions[@ targetNamespace='http://tempuri.org/']/wsdl:service[@name='VPServices']/wsdl:port[@name='BasicHttpBinding_IVPServices'] App_WebReferences/VPServices/