Geeks With Blogs

News

View Anthony Trudeau's profile on LinkedIn

Add to Technorati Favorites


Anthony Trudeau

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.InvalidProgramException: 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 the internal type

The exception is not thrown if the InternalsVisibleToAttribute is assigned to the source assembly and the accessor type is not used; nor is it thrown if the method is not a generic method.

Bug #635093 has been added through Microsoft Connect

Posted on Friday, January 7, 2011 11:33 AM | Back to top


Comments on this post: InvalidProgramException Running Unit Test

# re: InvalidProgramException Running Unit Test
Requesting Gravatar...
These are nice coding. These code helps a lot. Keep sharing such type of informative post.
Left by Mechanical Engineering Informati on Jun 27, 2011 8:59 PM

# re: InvalidProgramException Running Unit Test
Requesting Gravatar...
Thank you. I appreciate the comments.
Left by Anthony Trudeau on Jun 29, 2011 12:07 PM

# re: InvalidProgramException Running Unit Test
Requesting Gravatar...
Hi, It is really nice, but could you tell me how should I use this code,thanks for this information.prestiti veloci
Left by nehree on Aug 10, 2011 8:44 PM

# Mr.
Requesting Gravatar...
This is a wonderful orientating. I enjoyed the entropy lot. I noesis signification this authorised. Thanks for method this one connecter.
Left by aortic valve repair on Sep 23, 2011 2:10 PM

# re: InvalidProgramException Running Unit Test
Requesting Gravatar...
I have been through the whole content of this blog which is very informative and knowledgeable stuff, So i would like to visit again.
Left by configuration management on Mar 31, 2012 8:22 PM

# re: InvalidProgramException Running Unit Test
Requesting Gravatar...
I loved reading this post on how to deal with the bug on visual studio 2010. The different circumstances are well explained here and these points are useful for dealing with the bug systems. Keep sharing. Thank you
here
Left by maggie on May 03, 2013 8:02 AM

Your comment:
 (will show your gravatar)


Copyright © Anthony Trudeau | Powered by: GeeksWithBlogs.net | Join free