Search code examples
c#wcfasp.net-coreasp.net-core-mvc

Has the Simplicity of adding a Service Reference been removed in .NET Core App?


I ventured to create an ASP.NET Core web application to access my WCF service and realized that the option to add a service reference has been replaced with "Connected Services".

Per Microsoft documentation, "the WCF Connected Service for .NET Core and ASP.NET Core, a VS extension providing an experience similar to the “Add Service Reference” functionality. This tool retrieves metadata from a WCF service in the current solution, locally or on a network, and generates a .NET Core compatible source code file for a WCF client proxy that you can use to access the service."

While this sounds great, I found the simplicity of adding my service reference to become just a bit more cumbersome and convoluted. Of course, this is my opinion of the change. Not to mention, I still haven't figured it out.

Exactly how do you add a WCF service reference to the project now?

Right-click offers only one option, "Add Connected Service". After which, I am provided options of:

  1. Monitoring with Application Insights
  2. Cloud Storage with Azure Storage
  3. Find more services...

If I select "Find more services...", then I'm presented with a dialog of Extensions and Updates.

All I want to do is add my existing service reference! Why all the convolution of what was previously such a simple procedure? But I digress for the moment, maybe I'm getting taking things out of proportion due to my lack of understanding of the "new" Core framework.

My question was going to be simply, "How do you add a service reference to a .NET Core Web application?" but after realizing it would be a duplicate question and the fact that none of the answers I've seen provided "when provided" were not actually straight forward responses to the question.

So before I conclude that this new model seems to be a subtle nudge for integration into Azure based cloud computing and etc.

Simple question is, "Has the Simplicity of adding a Service Reference been removed in .NET Core App?"

I don't want to know the alternative methods of connecting to a WCF service using proxy utils and etc. I already know that.


Solution

  • You just need to update to the 15.5.x version. From the release notes you will find the entry:


    • Release Date: December 4, 2017 - Visual Studio 2017 version 15.5

    ...
    The WCF Web Service Reference for .Net Core is now part of Visual Studio 15.5.
    ...

    as the date of this answer, 15.5.3 is the latest version