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.