ericschmidt;10659 wrote:I tried your suggestion of debugging using the existing task runner project, but even that resulted in a passing test. I have noticed that our project has a "Abnormal runtime assembly reference resolution detected" warning that shows up. Is it possible that this is causing the TargetInvocationExceptions? Or is there something else I should look for?
It's possible that this could be causing the problem. NCrunch gives this warning when it detects an assembly being loaded by the CLR from the wrong place. If the assembly also happens to be different to the intended target, this could create problems.
Try turning on the
preload assembly references setting for your test project to see if this makes any difference.
Are you able to be any more specific about the TargetInvocationException you're receiving? Is this being thrown within your own code?