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.
Hi @Kmcnet ,
Thanks for reaching out.
In your older project, the service reference was generated using an older version of Microsoft.Tools.ServiceModel.Svcutil (2.0.3). That version generated a concrete InterOp_ServiceSoapChannel class, which is why this worked:
var client = new FLShotsInterop.InterOp_ServiceSoapChannel();
In the newer project, Microsoft Visual Studio 2026 is using Svcutil 8.0.0. The newer tool generates a different proxy structure. Specifically:
-
InterOp_ServiceSoapChannelis now an interface or abstract type. - You can no longer directly instantiate it with
new. - A concrete client class is generated (usually something like
InterOp_ServiceSoapClient), and that’s what you should create instead.
So instead of:
var client = new InterOp_ServiceSoapChannel();
Look inside Reference.cs and find the generated concrete client class. It will typically look like:
var client = new InterOp_ServiceSoapClient(
InterOp_ServiceSoapClient.EndpointConfiguration.HL7IISMethods);
If you’re seeing errors on every line in Reference.cs, that usually points to one of these:
- Missing WCF packages
- Target framework mismatch
- SOAP 1.2 binding requiring proper configuration support
Make sure your project has the required System.ServiceModel.Http (and related) packages installed, since modern .NET doesn’t include full WCF client support by default.
If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide provide feedback. Thank you.