0

I am unable to add a connected service reference to a WCF endpoint in VS 2019. I used to be able to do it in VS2017 with an extension. Now I can't find the extension anywhere, and when I try to add a connected service, I get lots of options but nothing for a WCF service.

Just to clarify, I am not trying to develop a WCF service, just trying to create a service reference to act as a client to a remote WCF service.

There is an article on how to use such a tool, here, but absolutely no information on where to find the tool or how to install it. I even found what may be the source code for the tool, but again with no installation instructions.

My project is a .NET Core project, targeting NetStandard 1.6.

enter image description here

Randy Gamage
  • 1,801
  • 6
  • 22
  • 31
  • Have you read this question? https://stackoverflow.com/questions/48522849/what-replaces-wcf-in-net-core – Metro Smurf Sep 27 '21 at 17:42
  • yes, that post is mostly about server-side support of WCF in .NET Core. I realize that is going away, but going forward, .NET apps will still need to communicate, as a client, with legacy WCF services, so I believe WCF clients are still fully supported in .NET Core. – Randy Gamage Sep 27 '21 at 17:47
  • 1
    I wonder why the search engine never leads you to https://learn.microsoft.com/en-us/dotnet/core/additional-tools/dotnet-svcutil-guide?tabs=dotnetsvcutil2x but it is much easier to use and with/without VS. – Lex Li Sep 28 '21 at 04:15

2 Answers2

0

.Net Core is still supporting client-side. You can use hosted service in it and add the ip:port/wcfinterface from the connected services.

You can try it by following this link.

Jiayao
  • 510
  • 3
  • 7
  • As I mentioned in my question, when I try to add a service as described in that article, the only choices I have are shown in the screenshot – Randy Gamage Sep 28 '21 at 18:31
  • Maybe you can take a look at the [add wcf service in vs 2015 and 2017](https://agirlamonggeeks.com/2017/03/19/adding-wcf-service-to-asp-net-core-application-vs-2015-and-vs-2017/) and try running with it in 2019. – Jiayao Sep 29 '21 at 09:32
0

I was able to resolve this issue by simply creating a new class library targeting NetStandard2.0. Right-clicking on Dependencies -> Managed Connected Services now showed an additional item below the Service Dependencies item, called Service References. Adding a new Service Reference, you are then presented with a WCF option.

enter image description here

I tried re-targeting this class lib back to NetStandard1.6, and all is still working. My original class lib was very old, and had some old stuff like dnxcore50 in the .csproj file, so maybe something there was screwing it up.

Thanks all for the suggestions.

Randy Gamage
  • 1,801
  • 6
  • 22
  • 31