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

Notification

Icon
Error

NCrunch using wrong bindingRedirect
lstahel
#1 Posted : Tuesday, April 4, 2017 8:00:42 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/4/2017(UTC)
Posts: 1
Location: Switzerland

I am having following Problem:

We have a few Tests that use xBehave. All of the tests get built and executed without problems with the VS 17 Test environment. But with NCrunch we get following Error:

System.TypeLoadException: Der Typ "Xunit.LongLivedMarshalByRefObject" in der Assembly "xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c" konnte nicht geladen werden.
bei Xbehave.Execution.ScenarioRunnerFactory.Create(Object[] scenarioMethodArguments)
bei Xbehave.Execution.ScenarioOutlineRunner.<AfterTestCaseStartingAsync>d__8.MoveNext()


But the app.config clearly has different configuration:

Code:
<dependentAssembly>
        <assemblyIdentity name="xunit.core" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.2.0.3545" newVersion="2.2.0.3545" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="xunit.execution.desktop" publicKeyToken="8d05b1bb7a6fdb6c" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.2.0.3545" newVersion="2.2.0.3545" />
      </dependentAssembly>


I tried with different configurations with the Build in Ncrunch but nothing seems to help.

(NCrunch 3.6.0.2, xUnit 2.2.0.3545, xBehave 2.2.0-beta0003-build685)
Remco
#2 Posted : Tuesday, April 4, 2017 9:40:30 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Hi, thanks for sharing this problem.

At the moment, NCrunch is still on xunit v2.1. There are plans to upgrade this to v2.2 along with some integration changes to allow the engine to be more forwards-compatible with future versions of xunit.

To immediately solve this problem, you have two options:
1. You can try updating the xunit DLLs in the NCrunch installation directory. In theory, this should allow NCrunch to immediately start using xunit v2.2. In practice, this hasn't yet been tested.
2. You can downgrade your version of xbehave to an earlier version which is integrated with xunit v2.1. Assuming you also downgrade your version of xunit, it should then work correctly.
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.041 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download