I am using vs2013 and vs2015 and cannot remove the service references:

a normal right click and then delete show do the job (or the delete key on the keyboard when selected) But I get:

The configuration for the service reference could not be deleted due to the following issue: An error occurred creating the configuration section handler for system.serviceModel/bindings: AssemblyResolveEvent handlers cannot return Assemblies loaded for reflection only.
Here is the part of my web.config (line 249 and more)
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="PayPalAPISoapBinding">
<security mode="Transport" />
</binding>
<binding name="PayPalAPIAASoapBinding">
<security mode="Transport" />
</binding>
<binding name="PayPalAPISoapBinding1" />
<binding name="PayPalAPIAASoapBinding1" />
<binding name="PayPalAPISoapBinding2">
<security mode="Transport" />
</binding>
<binding name="PayPalAPIAASoapBinding2">
<security mode="Transport" />
</binding>
<binding name="PayPalAPISoapBinding3" />
<binding name="PayPalAPIAASoapBinding3" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://api.sandbox.paypal.com/2.0/" binding="basicHttpBinding" bindingConfiguration="PayPalAPISoapBinding" contract="PayPalSvc.PayPalAPIInterface" name="PayPalAPI" />
<endpoint address="https://api-aa.sandbox.paypal.com/2.0/" binding="basicHttpBinding" bindingConfiguration="PayPalAPIAASoapBinding" contract="PayPalSvc.PayPalAPIAAInterface" name="PayPalAPIAA" />
<endpoint address="https://api.sandbox.paypal.com/2.0/" binding="basicHttpBinding" bindingConfiguration="PayPalAPISoapBinding2" contract="PayPalLive.PayPalAPIInterface" name="PayPalAPI1" />
<endpoint address="https://api-aa-3t.sandbox.paypal.com/2.0/" binding="basicHttpBinding" bindingConfiguration="PayPalAPIAASoapBinding2" contract="PayPalLive.PayPalAPIAAInterface" name="PayPalAPIAA1" />
</client>
</system.serviceModel>
I referenced the WSDL from paypal years ago and rebuild the whole thing using the nuget package (REST instead of the old soap api)
But I cannot cleanup the old wsdl code and (service)references. I got the same error if I deleted the web.config part and deleted the reference afterwards.
Steps to manually fix it:
Removed the client and bindings part from the system.serviceModel in the web.config manually.
Removed the service reference dir from the filesystem
manually edited my *.csproj file. (Searched for paypal and removed everything except the new nuget reference. Also removed the "service reference" reference from the csproj.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With