An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Thank you for reaching out.
The build errors occur because the WCF service reference was added in a way that is not compatible with .NET Core / modern .NET.
In .NET Core and later versions, manually adding NuGet packages such as System.ServiceModel.Primitives, System.ServiceModel.Http, or System.ServiceModel.Security is not sufficient by itself. The WCF client proxy code (which uses types like ClientBase<T>) must be generated specifically for .NET Core. If proxy code generated for .NET Framework is reused, or if the code is added manually, it leads to multiple build errors including ClientBase<T>-related issues.
This typically happens when:
- A WCF service reference generated for .NET Framework is reused in a .NET Core / .NET 5+ project, or
- The service proxy code is copied or added manually instead of being generated using the supported tooling.
For .NET Core and later, the supported approach is to generate the WCF client proxy using Connected Services → Microsoft WCF Web Service Reference Provider in Visual Studio, or by using the dotnet-svcutil tool. These tools generate compatible proxy code and automatically add the correct WCF client dependencies, which avoids these build errors.
The issue is with how the WCF client proxy was added, not with the WCF service itself.
References
- Microsoft Docs – Add a WCF Web Service Reference (.NET Core / .NET 5+) https://learn.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide
- Microsoft Docs – ClientBase<TChannel> class https://learn.microsoft.com/en-us/dotnet/api/system.servicemodel.clientbase-1
Please let us know if you require any further assistance, we’re happy to help. If you found this information useful, kindly mark this as "Accept Answer". So that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.