Hi Tom,
Thanks for posting!
NCrunch itself doesn't have any knowledge of ASP.NET or its membership providers, so my suspicion is that this is a symptom of a much deeper problem - perhaps related to the .config file being applied to your test environment, or the assemblies it is referencing.
I recommend trying to deduct the source of the problem by looking for differences between the NUnit test environment and NCrunch. Specifically, check the following:
- Are both environments loading the same .config file? You can check the .config file being used by NCrunch by right clicking on the failed test, going to Advanced->Browse To Workspace, then looking for the ncrunchconfig file in the build output directory of the shadowed project NCrunch has used for the test run
- Are both environments using the same processor architecture and version of the .NET framework? You can often tell this by checking the list of loaded modules under a debug session
- Are both environments loading the same versions of the .NET framework assemblies? Again, the list of running modules can help you here
- If you browse to the .DLL NCrunch has built for your test project (using the Advanced->Browse To Workspace option), then try loading this DLL under NUnit, what kind of result do you get?
If you haven't already, it's also worth having a skim over the
test troubleshooting guide to see if there's anything here that might be causing the deeper issue.
Cheers,
Remco