Reputation: 356
I converted my console app to Class Library project so that I can use dll again for multiple project. I am getting an error
Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f711d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference
I already tried the solution mentioned here Could not load file or assembly System.Net.Http.Primitives. Located assembly's manifest definition does not match the assembly reference.
But no luck. Any suggestion
Upvotes: 1
Views: 598
Reputation: 3751
What version of .NET are you using? If it is 4.0 or later can you check whether your library is set to use the Client framework or the full one. To check this you can right click on the project and select properties, it should then be on the first tab. Make sure it is set to the full framework not the Client framework.
Upvotes: 1
Reputation: 2171
Try this:
Cheers
Upvotes: 1
Reputation: 6921
Try adding this to your web.config (or app.config):
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.2.18.0" newVersion="2.2.18.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Upvotes: 1