I am using Visual Studio 2017 and creating .Net Standard Library. In this library, I am adding reference to WCF Service by using WCF Connected Service option. As this project is a class library, I am adding its reference in a console app (Executable project).
In my .net standard project, I am calling a method from WCF service library. When I run the project, I get error -
System.IO.FileNotFoundException: 'Could not load file or assembly 'System.ServiceModel.Primitives, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.'
So, In package manager console, I install System.ServiceModel.Primitives package for .net standard library project, but I still get the same error. If I also install the same NuGet for executable project, then the error goes away.
My question is, do I have to install all NuGet packages two times (once for class library and then once on executable project)?
What I have tried:
I have tried adding reference to System.ServiceModel and System.ServiceModel.Primitives dll in executable project