Home > .net 3.5, AJAX, c#, Microsoft, MVC, ReSharper, Visual Studio 2008 > Using xUnit.net in ReSharper 4.1 and MVC

Using xUnit.net in ReSharper 4.1 and MVC

September 11, 2008

Ben Taylor has saved us all a HUGE load of frustration by releasing a patched version of the xUnit.net installer and libraries that works with ReSharper 4.1.

There’s a final step, however, if you want it to work with the MVC Framework (this is for Preview 5).

The default xUnit.net MVC template package includes a 3rdParty directory for the xUnit.dll file.  The Test project also references that same library for the context of the tests.  To take advantage of Ben’s new 4.1’esque library, you need to update the 3rdParty file with his or you’ll be seeing red.

Steps:

1. Open your MVC Test project.

2. Remove (delete) the 3rdParty/xunit.dll.

3. Add an Existing File to the 3rdParty directory, pointing to the new library from Ben.

4. Under the Test project’s References, refresh the xunit reference and be sure it’s picking up the new file (the caution icon should disappear).

5. Run your tests in ReSharper and be very happy.🙂

Working MVC tests with xUnit and Ben's Patch.

  1. September 12, 2008 at 9:02 am

    Thanks for the props Dave!

  1. No trackbacks yet.
Comments are closed.
%d bloggers like this: