1

I have a WCF Service that I'm trying to write a client for. When I add a service reference there is no problem. If I update the reference, I receive the "Error HRESULT E_FAIL has been returned from a call to a COM component" error. My service is running (not in debug mode). I have two main questions on this, and so far I haven't been able to find out much from my research.

  1. What exactly does this error mean?
  2. How can I begin troubleshooting the issue? I don't have enough information, but I don't know where to look to find any logs or data related to the issue.

For my service, this is only happening in Visual Studio 2017 and 2019. If I create a client in 2015 and update the reference, there is no problem.

Thanks for any help in figuring out how to track this down.

Nate276
  • 13
  • 1
  • 3
  • does this answer your question? https://stackoverflow.com/questions/34672422/while-updating-service-reference-i-get-error-hresult-e-fail-has-been-returned-fr – Useme Alehosaini Dec 22 '20 at 16:32
  • The mistakes you encounter are very common. There are many similar problems on Google and have been solved. You can go and take a look, hope your problem can be solved perfectly. – Theobald Du Dec 24 '20 at 05:23
  • Unfortunately it isn't cache related as it is happening in both 2017 and 2019 (and also on another machine). Most solutions I've found have been related to caching so I haven't found a good solution yet. I just wish I knew how to track it down. – Nate276 Dec 24 '20 at 13:54
  • Go to Tools -> Options -> Projects and Solutions -> Web Projects then uncheck "Automatically show data connections from web.config in Server Explorer..." then recompile. – Theobald Du Jan 05 '21 at 05:48

1 Answers1

0

After some time off around the holidays, I got back into it today and was able to track down the issue. I have a custom proxy code generator I used and it was not registered correctly in 2017 or 2019. I compiled a .pkgdef into the vsix and build time which registers the generator into the local registry of VS.

You can find more information on registering and unregistering VSPackages here: https://learn.microsoft.com/en-us/visualstudio/extensibility/registering-and-unregistering-vspackages?view=vs-2019

Nate276
  • 13
  • 1
  • 3