Custom tool warning: Cannot import wsdl:portType / wsdl:binding ! [Solution]

Was getting the following error while adding a WCF service reference to an MVC application-

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='']/wsdl:portType[@name='']
XPath to Error Source: //wsdl:definitions[@targetNamespace='']/wsdl:binding[@name='']

I had used the same service reference in other applications but never got this error. Finally the solution that worked was to uncheck the ‘reuse types in reference assemblies’ in the advance menu while adding service reference.


  • Right click on Service References and select ‘add service reference…’ option. Now click on Advanced button.


  • Now uncheck the ‘reuse types in reference assemblies’ option and click on OK.


  • Now add the service reference.

Service reference should be added without any error/warnings.

Please like, share and comment.

Thanks for checking out !

All comments.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.