If you get the above error when trying to add a WCF service reference that you have previously deleted then try:

  • deleting the Service References.DeviceService.Reference.cs.dll file you’ll find under obj\Debug\TempPE. 
  • deleting the service folder you’ll still find under Service References on disk, even though you deleted the reference in Visual Studio.
  • commenting out all references to the service’s namespace in your code
  • rebuilding

One Response to “Dealing with WCF Error: Cannot create a service reference with namespace X because the name is already in use by an existing service reference, folder or file”

  1. Thierry Says:

    I had the same issue but I solved it in a different way:

    When adding the “Service Reference” click on the “Advanced…” button on the lower left side and by default the option “Reuse types in referenced assemblies” is selected, Deselect it, press “Ok” and that should do it ;)

    …Ok, I know almost a year later lol

Leave a Reply