How can I use IErrorHandler and IServiceBehavior in a .NET Standard 2.1 project? I tried to add the nuget System.ServiceModel.Primitives but still doesn't work, and I also can't find anywhere how to do it.
Asked
Active
Viewed 551 times
0
-
1You also need to install `System.ServiceModel.Http` package,https://stackoverflow.com/a/48112592/17218587, and you can download other packages as needed.https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-5#windows-communication-foundation – Lan Huang Jan 25 '22 at 05:55
-
@LanHuang Even after I installed all packages: (System.ServiceModel.Duplex, System.ServiceModel.Federation, System.ServiceModel.Http, System.ServiceModel.NetTcp, System.ServiceModel.Primitives, System.ServiceModel.Security) it still can't find – Paulo Jan 25 '22 at 10:42
-
You also need to add a reference to the project, you can right click on the project, go to "**Add Connected Service**" and click "**Microsoft WCF Web Service Reference Provider**", you can also take a look at [the doc](https://learn.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide). – Lan Huang Jan 26 '22 at 05:14