Build/Test Issues

NCrunch not respecting binding redirect

Started by AlexFoxGill on 7,218 views

I am using xUnit with the AutoFixture extension, plus a NuGet package of my own that has a dependency on AutoFixture.

My custom package has a dependency on a previous version of AutoFixture, so I use a binding redirect in the app.config to rectify this. The project builds with no errors, and ReSharper can run the tests just fine. However, it seems that NCrunch can't run the project, as I get this error:

This test was not executed during a planned execution run. Ensure your test project is stable and does not contain issues in initialisation/teardown fixtures.


This is reproducible in a new project:

1. Search for the xUnit AutoFixture NuGet package and install it, which will install AutoFixture and xUnit
2. Set up a simple test e.g.
    public class Class1
    {
        [Fact]
        public void Pass()
        {
            Assert.True(true);
        }
    }

3. Observe that the test passes in NCrunch
4. Search for the AutoFixture Entity Framework extension authored by myself, and install it
5. Observe that the test suite now fails with the quoted message

External image

I am not sure where to go from here in terms of debugging the issue, any help would be greatly appreciated!

Edit:

I forgot to mention that I am using NCrunch version 1.46.0.20

Edited

Hi, thanks for posting!

The version of NCrunch that you're running is unfortunately very far out of date. Have you tried one of the later versions to see if this solves the problem for you?


Cheers,

Remco
Thanks, I hadn't realised I was so far behind! Updating to the latest version worked :) Fantastic tool by the way, makes unit testing a joy
Great to hear! I'm glad you're enjoying the product :)

There's been LOTS of improvements since the old build you were running. I recommend checking up on the blog and the release notes on the download page to see what you've been missing.

Post a reply

Log in to reply.