In a previous post I reported an InvalidProgramException that occurs in a certain circumstance with unit tests involving accessors on a private generic method. It turns out that Bug #635093 reported through Microsoft Connect will not be fixed. The reason cited is that private accessors have been discontinued. And why have private accessors been discontinued? They don't have time is the reason listed in the blog post titled "Generation of Private Accessors (Publicize) and Code Generation for Visual ......
There is a bug in the unit testing framework in Visual Studio 2010 with unit testing. The bug appears in a very special circumstance involving an internal generic type. The bug causes the following exception to be thrown: System.InvalidProgramExcept... JIT Compiler encountered an internal limitation. This occurs under the following circumstances: Type being tested is internal or private Method being tested is generic Method being tested has an out parameter Type accessor functionality used to access ......