Mike Flynn Mike Flynn - 2 months ago 13
C# Question

Different DLL but should be the same in console application and website

I have a console application and website that use the same

System.Runtime.Serialization.Primitives.dll
assembly. However, when I run the website, my assembly is the one on the right, but if I run consolation application, the DLL for the website turns to the one on the left and causes errors. Both projects are v4.7 and this started happening after I upgraded all my projects to that Framework.

Both projects have this in it

<dependentAssembly>
<assemblyIdentity name="System.Runtime.Serialization.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
</dependentAssembly>


enter image description here

Answer Source

I went ahead and upgraded to Visual Studio 2017 since I was using 2015. After doing that things started working correctly and a lot of these reference issues went away.