Installing xUnitContrib Test Runner in VS2008

I use as my main test framework for a range of C# projects, including one in VS2008. This project is for a Windows Mobile 6.5 application and so can’t be moved on to Visual Studio 2010 / 2012 / 2013.

With the new Extension Manager in ReSharper (NuGet) it is easy to install the latest xunitcontrib update (called Test Support in the NuGet listing) into Visual Studio 2010 / 2012 and 2013. However, it is slightly more problematic to install into VS2008. Matt Ellis (Author of xunitcontrib) does supply a batch file to install but this sometimes lags behind the main release via NuGet.

On both the R# 8.0 and 8.1 releases I found that the following worked on my system (Win 7, 64 bit):

  1. Update ReSharper for all versions of Visual Studio.
  2. Update Test Support via the ReSharper Extension Manager in VS2012 (my other main dev environment).
  3. Find the location of the newest xunitcontrib.runner libraries – in my setup they are here (for R# 8.1): C:\Users\<username>\AppData\Local\JetBrains\ReSharper\vAny\packages\xunitcontrib.1.3.0\ReSharper\v8.1\plugins\xunitcontrib.runner.resharper.runner.8.1.dll
  4. I then copy the entire plugins folder to: C:\Program Files (x86)\JetBrains\ReSharper\v8.1\Bin\  .  Both times I have used this method the plugins folder didn’t exist so it was just a clean copy. If it does exist then copy the contents of the original plugins folder (step 3) into the existing one.
  5. Start VS2008 and open your test project – the tests should be marked and ready to work with as expected.

So far, I haven’t encountered any problems using this method and it follows the guidelines given by Matt for installing earlier versions of xunitcontrib.

For more information on the xUnit test runner: contrib web site.