The located assembly's manifest definition does not match the assembly reference

前端 未结 30 2062
北恋
北恋 2020-11-22 01:41

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

30条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-22 01:58

    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.

提交回复
热议问题