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

前端 未结 30 2624
北恋
北恋 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:59

    This exact same error is thrown if you try to late bind using reflection, if the assembly you are binding to gets strong-named or has its public-key token changed. The error is the same even though there is not actually any assembly found with the specified public key token.

    You need to add the correct public key token (you can get it using sn -T on the dll) to resolve the error. Hope this helps.

提交回复
热议问题