

This log gives insights into how assembly is located. ERR: Failed to complete setup of assembly (hr = 0x80131040). ERR: Run-from-source setup phase failed with hr = 0x80131040. LOG: Assembly Name is: Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed WRN: Comparing the assembly name resulted in the mismatch: Major Version ERR: The assembly reference did not match the assembly definition found. Attempting setup of file: F:\visual studio 2017\Projects\TestBindingApp\TestBindingApp\bin\Debug\ LOG: Entering run-from-source setup phase.

LOG: Attempting download of new URL file:///F:/visual studio 2017/Projects/TestBindingApp/TestBindingApp/bin/Debug/. LOG: Post-policy reference: Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed LOG: GAC Lookup was unsuccessful. LOG: Using application configuration file: F:\visual studio 2017\Projects\TestBindingApp\TestBindingApp\bin\Debug\ LOG: Using host configuration file: LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v9\config\ nfig. Here is sample log of probing (relevant parts are made bold): LOG: This bind starts in default load context. Go to debug (under bin) directory of project. When you build solution there can be one in bin/debug or bin/release folder.įuslogvw.exe is assembly binding log viewer (installed with Visual studio), run it from developers command prompt with admin privileges. I am also referencing some library that is also using Newtonsoft.Json but with different version. If you just want to know the solution, you can skip this section, however, I recommend to go through it once to understand why we get this exception.Ĭonsider the scenario where I am using Newtonsoft.Json in my project. It is easy to resolve provided that the new assembly version is backward compatible.īefore going into how to resolve this issue, let’s understand how runtime locates the assembly. When we use multiple versions of same assembly, it is more likely to encounter this runtime exception. How to resolve “Could not load file or assembly … or one of its dependencies” and why this exception thrown in.
