I am trying to run some unit tests in a C# Windows Forms application (Visual Studio 2005), and I get the following error:
System.IO.FileLoadException: Co
In my case the problem was between the chair and the keyboard :-)
Could not load file or assembly 'DotNetOpenAuth.Core, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=2780ccd10d57b246' or one of its dependencies.
The located assembly's manifest definition does not match the assembly reference.
(Exception from HRESULT: 0x80131040)
Two or more different assemblies wanted to use a different version of the DotNetOpenAuth library, and that would not be a problem. Furthermore, on my local computer a web.config was automatically updated by NuGet:
Then I realized that I had forgot to copy/deploy the new web.config to the production server. So if you have manual way of deploying web.config, check it is updated. If you have completely different web.config for production server, you have to merge these dependentAssembly section in sync after using NuGet.