Using Machine.Specifications.XUnit fails with File.IO error #1

robconery opened this Issue May 13, 2009 · 2 comments


None yet

2 participants


Hi Aaron and friends - really digging MSpec so far, but I wanted to use it with xunit because Brad will smack my upside the head if I don't!

I found an issue, however, when using the Extensions. You can repro this using the latest trunk:

  1. Open up the source and using Machine.Specifications.Example
  2. Remove the reference to Machine.Specifications.NUnit
  3. Add a ref to Machine.Specifications.XUnit
  4. Run test with TD.NET (BankingSpecs.cs)

You should get an error that says:

System.IO.FileNotFoundException: Could not load file or assembly 'xunit, Version=, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c' or one of its dependencies. The system cannot find the file specified.
File name: 'xunit, Version=, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c'
at Machine.Specifications.XUnitShouldExtensionMethods.ShouldEqual[T](T actual, T expected)
D:\MSpec\machine.specifications\Source\Machine.Specifications.Example\BankingSpecs.cs(16,0): at Machine.Specifications.Example.when_transferring_between_two_accounts.<.ctor>b__6()
D:\MSpec\machine.specifications\Source\Machine.Specifications\Model\Specification.cs(75,0): at Machine.Specifications.Model.Specification.InvokeSpecificationField()
D:\MSpec\machine.specifications\Source\Machine.Specifications\Model\Specification.cs(53,0): at Machine.Specifications.Model.Specification.Verify()

I don't have nunit in my GAC
I'm running Win7 RC1 with VS 2008 SP1

It looks like it's a simple proximity issue with the xunit dll - and I looked in the libraries and it's there (xunit.dll) so I'm not entirely sure why it's not loading.

If you switch back to the NUnit extensions - everything works.

MSpec is currently using an old XUnit. If you use the same version or rebuild MSpec w/ the XUnit you're using this should go away.


This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment