Visual Studio 2019 16.11 - Can't update nor create WCF service reference in netstandard 2.1 project

Viewed 1731

I'm not sure when it disappeared, but I can't update my service references anymore, this is all new, I updated them like a month ago in a previous VS version without problems...

NOWCF

nowcf2

It's in a solution with a Xamarin Android project, the service references are in a .netstandard 2.1 project.

Also, if I try to add it manually from the Service References manager, weird errors pop up, and they don't make sense since using dotnet-svcutil is working:

wcf43

2 Answers

This situation is common when I add references, delete references, and then re-add services with the same name. The type conflict seems to be caused by an old file that remains in a place where Visual Studio can still see it. All you need to do is clean it up before adding a new reference.

1.Delete the service reference in question.

2.Click the project name in the Solution Explorer to highlight the project.

3.Right-click the project reference.

4.Near the top of the context list, click Cleanup Items.

5.Add your service reference as usual.

Here is a similar example:https://github.com/dotnet/wcf/issues/3827

Related