-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CS0108 in generated client code #5595
Comments
By default, the tool conditionally generates Specifically, if the project references a WCF package version equal to or greater than 4.10, If this situation does not match your experience, it could indicate other issues related to handling of the project's multi-framework-targets. Could you please share the .csproj configuration, including the version of the WCF package referenced by the project when you encountered the problem? Thank you. |
csproj before adding WCF reference
After adding WCF reference
Since I'm using
Compilation fails with Now, I want to use version It seems there is no way to generate the correct proxy code when multi-targeting and using |
Thanks, @acohenOT, for the information. The CS0108 warning likely stems from the premature generation of the Regarding the outdated WCF package version referenced in your multi-targeting project (netstandard2.0 and net8.0), another PR is addressing this issue. As a workaround, you can manually update Directory.Packages.props to the desired version, 4.10.3, as you did after code generation. |
Describe the bug
While generating a client from a WSDL with dotnet-svcutil (version 2.1.0) we are seeing a CS0108 error.
error CS0108: 'OurServiceNameClient.CloseAsync()' hides inherited member 'ClientBase.CloseAsync()'. Use the new keyword if hiding was intended.
This is in a project that targets netstandard2.0 and net8.0.
Additional context
This issue was previously marked fixed in 2.1.0 see #4891
The text was updated successfully, but these errors were encountered: