Warning 1 Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Could not load type 'System.Runtime.Serialization.DataContractSet' from assembly 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://msrmaps.com/']/wsdl:portType[@name='TerraServiceSoap'] E:\ASP.NET\Visual Studio 2010\Projects\XapNote\XapNote\Service References\myTerraService\Reference.svcmap 1 1 XapNote
Warning 2 Custom tool warning: 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://msrmaps.com/']/wsdl:portType[@name='TerraServiceSoap']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://msrmaps.com/']/wsdl:binding[@name='TerraServiceSoap'] E:\ASP.NET\Visual Studio 2010\Projects\XapNote\XapNote\Service References\myTerraService\Reference.svcmap 1 1 XapNote
Warning 3 Custom tool warning: 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://msrmaps.com/']/wsdl:binding[@name='TerraServiceSoap']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://msrmaps.com/']/wsdl:service[@name='TerraService']/wsdl:port[@name='TerraServiceSoap'] E:\ASP.NET\Visual Studio 2010\Projects\XapNote\XapNote\Service References\myTerraService\Reference.svcmap 1 1 XapNote
Warning 4 Custom tool warning: No endpoints compatible with Silverlight 3 were found. The generated client class will not be usable unless endpoint information is provided via the constructor. E:\ASP.NET\Visual Studio 2010\Projects\XapNote\XapNote\Service References\myTerraService\Reference.svcmap 1 1 XapNote
Warning 5 Custom tool warning: Exception has been thrown by the target of an invocation. E:\ASP.NET\Visual Studio 2010\Projects\XapNote\XapNote\Service References\myTerraService\Reference.svcmap 1 1 XapNote
Error 6 Custom tool error: Failed to generate code for the service reference 'myTerraService'. Please check other error and warning messages for details. E:\ASP.NET\Visual Studio 2010\Projects\XapNote\XapNote\Service References\myTerraService\Reference.svcmap 1 1 XapNote
解决办法:
添加service reference 的时候选择advanced
select Generic.List for collection type, uncheck the reuse types in reference assemblies and the compilation is succesfull
希望帮助到别人