We recently had a rather large checkin committed by another developer in our web client who doesn't yet use NCrunch. As a result, everybody's solution is reporting this in the NCrunch build process:
Reference required to assembly 'SimpleInjector, Version=1.5.0.12199, Culture=neutral, PublicKeyToken=984cb50dea722e99' containing the type 'SimpleInjector.Container'. Add one to your project.
The line is as follows:
GlobalConfiguration.Configuration.DependencyResolver = New SimpleInjectorWebApiDependencyResolver(container)
Strangely the DLL does exist for the solution, I can see it in bin\SimpleInjector.dll
If I ignore the solution everything works fine, but I feel like i'm hiding the problem to a later date.
NOTE: my \AppData\Local\NCrunch\1140\34\_ncrunchreferences\ folder DOES contain references to the important DLLs.
IOC containers and IL injectors/weavers often make use of custom assembly resolution logic, which sometimes conflicts with NCrunch's build integration.
Although I'm not sure exactly how this injector component works, my first suggestion would be to try turning on the 'Copy referenced assemblies to workspace' setting for the projects in your solution, to see if this makes a difference. Generally this setting is not recommended because it can degrade build performance, although unfortunately some frameworks do rely on referenced assemblies being adjacent to build output files when code is being executed.
Let me know if this does the trick. If so, I'll help you delve a bit deeper to see if we can come up with a solution that doesn't involve this setting.
Bizarrely, I have setup a new project to isolate the issue, and I could not recreate it, until I copied my Web.Config file across and suddley I get the error message. I'll post it to bitbucket for you. Do you have a bitbucket account?
Oh man even weirder - I can remove some blank spaces from the web config and it builds okay, put them back in and it dies. Could this just be something to do with the files being built asynchronously and a race condition kills the dll being copied?