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

Notification

Icon
Error

Unable to run tests for Orleans
moswald
#1 Posted : Friday, September 23, 2016 2:45:21 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/31/2012(UTC)
Posts: 16
Location: Austin, TX

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Running tests for Orleans always results in this exception:
Quote:
System.Runtime.Serialization.SerializationException: Type is not resolved for member 'Orleans.Runtime.Silo+SiloType,OrleansRuntime, Version=1.2.3.0, Culture=neutral, PublicKeyToken=null'.


The Orleans HelloWorld tests are a good repro case: https://github.com/dotne...ster/Samples/HelloWorld

I've tried flipping the various NCrunch configuration flags like Include static references and Copy referenced assemblies to workspace, but I can't seem to find the magic combination to make it all work.
Remco
#2 Posted : Saturday, September 24, 2016 2:46:37 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,145

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
My best guess here is that the problem is being caused by an implicit dependency between two assemblies that don't actually reference each other.

For example, consider the following scenario:
- You have two projects that share the same build output directory (project A and project B)
- Neither of these projects explicitly reference the other. For build purposes, they are completely independent.
- At runtime, project A uses reflection to load a type from project B. Project A assumes project B is in the same directory.

The above situation will fail in NCrunch, even with the 'Copy referenced assemblies to workspace' turned on. This is because NCrunch has no data to tell it that these projects actually reference each other. There is no build dependency between them.

There are two ways to solve this problem:

1. Add a project reference from project A to project B
2. In NCrunch configuration, adjust the 'Implicit project dependencies' setting so that project A references project B. You can then use the data provided by the NCrunchEnvironment.GetImplicitlyReferencedAssemblyLocations() in NCrunch.Framework.dll to obtain the true location of Project B during test execution, and override the logic responsible for finding Project B so that it loads the assembly from NCrunch's workspace. You can find an example of this approach here - http://www.ncrunch.net/documentation/troubleshooting_tests-that-build-their-own-appdomains.
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.023 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download