Delta Engine Blog

AI, Robotics, multiplatform game development and Strict programming language

Fixing the 'Could not load file or assembly 'xunit, Version=7.10.25.1028'' error

In case you run into the following error:

Could not load file or assembly 'xunit, Version=7.10.25.1028, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
    System.IO.FileNotFoundException: Could not load file or assembly 'xunit, Version=7.10.25.1028, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
    File name: 'xunit, Version=7.10.25.1028, Culture=neutral, PublicKeyToken=null'
    at Xunit.TdNet.TdNetRunner.RunTests(Type type, MethodInfo method, ITestListener listener, TestRunState& runState)
    at Xunit.TdNet.TdNetRunner.RunMethod(MethodInfo method, ITestListener testListener)
    at TestDriven.TestRunner.AdaptorTestRunner.Run(ITestListener testListener, ITraceListener traceListener, String assemblyPath, String testPath)
    at TestDriven.TestRunner.ThreadTestRunner.Runner.Run()
    
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

This usually just means you have installed a newer version of xunit (in my case 1.0.0.1105), but you also had an older (beta, rc, etc.) version of xunit before, which maybe used the xunit.installer.exe utility to add support to TestDriven.NET 2.x or ReSharper 3.0. Just disable the support with this tool, Visual Studio and TestDriven (or ReSharper) work fine with the new version without that extra tool. In fact you can delete it after you have disabled all options.