Get xUnit.net Working with Resharper 4.1

Update 17/09/2008:  You no longer need the patch in this post.  Brad Wilson and the team at xUnit.net have just released xUnit.net Version 1.0.3.  This release supports ReSharper 4.x via a new, smarter installer.

Hi, my name is Ben and I am a ReSharper fanboyIf you ever have the misfortune of pair programming with me, I promise not to shout Ctrl+Alt+V , Ctrl+Q etc over your shoulder (sorry Mike).

Anyway, being a fanboy, I rushed out and installed ReSharper 4.1 as soon as it came out.  Unfortunately, this resulted in the loss of the the xUnit.net ReSharper integration that I also use!  Why you ask?  Well ReSharper plugins have to live in a sub-directory of the ReSharper install folder and every time ReSharper rev, they move the install location and the registry settings.  This means that when you run VS.NET you lose the test runner functionality and when you try and re-install xUnit R# integration you see red....  Bad R#. Boo.

sshot-2

So, I popped off to the xUnit.net discussions on CodePlex to find out about plans for R# 4.1 support and I ended up writing a patch to make it work (big thanks to Brad Wilson for his R# related patience and quick responses).  My installer now looks like this:

 sshot-3

I could not submit patches to xUnit for some xUnit legal reasons (IP Stuff).  So, if you want to get it running you can download the install binaries I built, or do the patch work yourself.

Do any of this at your own risk.  It is not my fault if this causes your machine to melt, or you to lose hectares of code etc, ad-infinitum.

Use the Binaries I Patched and Built

  1. Download my xUnit Installer Binaries for ReSharper 4.1
  2. Extract the zip and run xunit.installer.exe.
    Note:  There are not "official" xUnit binaries.  I modified and built these.

Or...

Patch xUnit Installer for ReSharper 4.1 Support

  1. Install ReSharper 4.1.
  2. Get the latest xUnit source (I used rev 23764).
  3. Apply my xUnit.net ReSharper 4.1 installer patch to xUnitSourceRoot (i.e. the root of where you checked out).
  4. Run xUnitSourceRoot\Main\3rdParty\Get3rdParty.cmd
  5. Make sure that xUnitSourceRoot\Main\3rdParty just filled up with a bunch of ReSharper binaries.
  6. Open xUnitSourceRoot\Main\xunit.sln
  7. Rebuild All.
  8. Run the installer:
    xUnitSourceRoot\Main\xunit.installer\bin\Debug\xunit.installer.exe