After signing the third parties assemblies and adding them to GAC I am getting the below error: also the Assembly Binder Log Entry shows this error
It says mismatch
I had a different cause: in my case, I had used various nuget package versions previously, and I had an app.config
which for some reason had been automatically generated with this kind of content:
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.1.1.0" newVersion="1.1.1.0" />
</dependentAssembly>
So I only had Version 1.1.0.0 installed, but because of this redirect instruction, it looked for 1.1.1.0 even though Visual Studio had the nuget for 1.1.0.0 installed. Changing the newVersion to 1.1.0.0 fixed everything:
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.1.1.0" newVersion="1.1.0.0" />
</dependentAssembly>
One way to solve this could be, going under "Manage NuGet Packages for Solution" by doing right click in the solution explorer. Once there, go to "Consolidate" and find the package that is causing the problems. Make sure that all the projects within the solution are using the same version.