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='http://tempuri.org/']/wsdl:portType[@name=''] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/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.
Steps-
- 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 !
Latest posts by Abhimanyu (see all)
- Switch between multiple proxies in Chrome browser [ProxySwitchy Guide] - February 12, 2016
- CISCO VPN CLIENT -REASON 442: FAILED TO ENABLE VIRTUAL ADAPTER [Fix] - January 31, 2016
- CynogenMod 13 (Android Marshmallow [6.0]) on Samsung Galaxy S3 GT-I9300. [21-12-2015] - December 21, 2015