wcf icon indicating copy to clipboard operation
wcf copied to clipboard

System.ServiceModel.Http v4.10

Open hoerup opened this issue 3 years ago • 2 comments

Describe the bug While trying to update to System.ServiceModel.Http v4.10.0 we now get this new warning (and since our pipelines runs with warnaserror this breaks the pipeline)

error CS0108: 'OurServiceNameClient.CloseAsync()' hides inherited member 'ClientBase<IOurServiceName>.CloseAsync()'. Use the new keyword if hiding was intended.

We have tried to regenerate the client client, even with latest VS2022, but doesn't help ? Any guide on how to proceed?

hoerup avatar Aug 22 '22 10:08 hoerup

Same problem here but with System.ServiceModel.Primitives v4.10.0. Same underlying issue though - WCF 3.4.0 (https://github.com/dotnet/wcf/pull/4865 I guess). Manually adding "new" to a auto generated client class does not feel right.

marhoi avatar Aug 22 '22 14:08 marhoi

The workaround is to delete the OurServiceNameClient.CloseAsync(), and the fix is to fix dotnet-svcutil not to generate 'OurServiceNameClient.CloseAsync()'.

HongGit avatar Aug 22 '22 21:08 HongGit

The latest release of dotnet-svcutil tool (2.1.0) fixed the problem in generated code. Closing issue.

imcarolwang avatar Nov 01 '22 07:11 imcarolwang