Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

NCrunch and FakeItEasy.Out And RefParameters Configuration Extensions
SebastianDamm
#1 Posted : Friday, December 13, 2019 2:45:03 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/3/2019(UTC)
Posts: 2
Location: Canada

I have a codebase with NUnit test suites, which I run with both Resharper Unit Test Sessions and NCrunch.

One of my test requires FakeItEasy. Out And RefParameters Configuration Extensions. Most of the time it works, but occasionally NCrunch fails that test with error:

Quote:
System.TypeLoadException : Could not load type 'FakeItEasy.OutAndRefParametersConfigurationExtensions' from assembly 'FakeItEasy, Version=1.21.0.0, Culture=neutral, PublicKeyToken=eff28e2146d5fd2c'.


Re-running the test in NCrunch invariably fixes it immediately.
I don't get that sort of error on any other test
The Resharper Unit Test runner doesn't have any issues with it at all.
I feel like the failures generally seem to happen in association with a git jump, or a Solution Clean, or an NCrunch "Resync"

Any ideas what's wrong and/or what I could do to make these false positives go away?
Remco
#2 Posted : Friday, December 13, 2019 9:09:21 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for sharing this issue.

My best guess here is that the loading of the type from this assembly is sequence specific. Probably if the referenced assembly has been previously loaded into the process, it works fine .. but if the test tries to run and load the assembly itself, it fails.

Turning on the 'pre-load assembly references' NCrunch setting for the test project might make a difference here.

I recommend inspecting the references you have to this assembly in your codebase. Make sure they are a consistent version, and ensure there is a reference from the test project to the assembly (or its equivalent package).
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.028 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download