Wednesday, February 15, 2012

Bing Route Service Reference errors in Visual Studio

When I was trying to reference the Bing Route service in a WP7 app (, I kept getting errors from SvcUtil that the service could not be referenced properly. Some of the error messages looked like the following:

Custom tool warning: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='']/wsdl:portType[@name='IRouteService']
XPath to Error Source: //wsdl:definitions[@targetNamespace='']/wsdl:binding[@name='BasicHttpBinding_IRouteService']

Not sure why the errors were being raised, but what I found was that if I deleted the existing service reference and then restarted Visual Studio and then re-added the service reference, the errors went away. WEIRD! but it works now.

No comments: