I am working on a large Azure (SDK 2.0) based project that contains 1000+ unit tests. A few hundred of them are failing with a TypeInstanceInitializerException when RoleEnvironment.IsAvailable is called, but only if run with the Visual Studio Test Explorer (VS2012 Update 3). The same tests when run in a ReSharper (7.1) test session pass without issues. They also pass on our CI server (Tinderbox). I've tried adding a .testsettings or .runsettings file and enabling deployment, but still see the exceptions thrown.
I've run into the reverse issue, where tests passed in the basic tool but failed in ReSharper, but never this way around. Can anybody give any hints at what else to look at?
After fruitless hours trying to pin this down enough to even give better information here, I gave up and rebuilt my machine. That appears to have fixed the problem.