In a .Net Standard 2.0 project, I am unable to load a reference to System.ServiceModel.Primitives... It says that Primitives doesn't exist on the System.ServiceModel namespace, even though I installed the System.ServiceModel.Http (v 4.10.3, which also depends on the System.ServiceModel.Primitives package) as well as the System.ServiceModel.Primitives (v 4.10.3) nuget packages, and in the properties for the dependencies, after being installed, it shows the correct path to the DLL files corresponding to the packages installed. I just don't get why/how it is not able to resolve the System.ServiceModel.Primitives dependency.

I've tried searching around online, on Stack Overflow, and trying various things to get past this dependency issue, but I'm really not sure how to proceed from here.

This dependency is used in some legacy WCF code in a larger legacy service that I've been upgrading in order to use newer (non-discontinued) SDKs.

1

There are 1 best solutions below

0
QI You On

.NET Standard is a formal specification of .NET APIs that are available on multiple .NET implementations.

.NET Standard 2.0 supports ASP.NET Framework 4.6.1-4.8.1 and ASP.NET Core.

Here is the documentation for .NET Standard

So I think you probably created Asp.Net Core project. However ASP.NET Core project does not support System.ServiceModel.Primitives.

You can use CoreWCF.Primitives. Here is the relevant documentation.