ekolis
ekolis

Reputation: 6786

What happened to Add Web Reference in Visual Studio 2019?

I see I can "Add Service Reference", but I'm trying to "Add Web Reference" because I'm following some sample code which does that, and I can't find that option...

Upvotes: 26

Views: 33480

Answers (3)

Mike Samons
Mike Samons

Reputation: 61

A potential workaround, at least for .NET framework users,

Just discovered that (in VS2019 at least) I can only add a WCF service reference to a project targeting .NET 5.0 and not in earlier frameworks. When targeting, say, 4.6.2 (as we are currently restrained by some legacy components) then I see only Azure, SQL and other connected service types. But after switching a test project to 5.0 I finally get this,

VS-2019-ConnectedServiceOptions

Now, it doesn't contain the Advanced/Add Web Reference screen that I'd used in prior years but this WCF wizard worked with an endpoint that previously only worked for that "Web Reference" and I now have my reference.

I was also able to revert the project to .NET 4.6.2 after adding this.

Upvotes: 3

SomeoneElse
SomeoneElse

Reputation: 479

Having looked at it a bit more, the current Microsoft story seems to be at https://learn.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide . If you follow that you can tell a WCF project about an existing SOAP web service, and it'll set up at least some of the references. It's not complete yet though (see the issues here) and is by no means a drop-in replacement for the previous functionality.

When importing a web service with warnings a web browser will open up on the release notes - some of the other links from there may be useful.

Upvotes: 3

Dialecticus
Dialecticus

Reputation: 16761

In that window click "Advanced...", and in the new window click "Add Web Reference...". They hid it, because it is old technology, but still in use.

Upvotes: 31

Related Questions