Call WCF NetTcpContextBinding from .NET Core 2.0

  • Thread starter Thread starter SAgosto
  • Start date Start date
S

SAgosto

Guest
I have a .NET Core 2.0 REST-based API and need to call an external API that uses NetTcpContextBinding binding. NetTcpContextBinding is not supported with .NET Core 2.0 (source: ). I tried to create a new project targeting the full .NET framework 4.6X but I get the following error: Could not load type 'System.ServiceModel.NetTcpContextBinding' from assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

The System.ServiceModel, Version=4.0.0.0 DLL reference within the full .NET framework references but when I view the DLL within an object browser, it is referencing the .NET Standard DLL variant: nuget\packages\system.servicemodel.primitives\4.4.3\ref\netstandard2.0\System.ServiceModel.dll

I cannot specify an app.config which is probably due to the fact that I am executing the call under the .NET Core 2.0 API. An option would be to create a new hosted API under .NET framework so it can run completely under the .NET Framework but I don't like the extra hop. What are my options?

Continue reading...
 
Back
Top