Geeks With Blogs


View Anthony Trudeau's profile on LinkedIn

Add to Technorati Favorites

Anthony Trudeau

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 Studio 2010".

In my opinion, it's a piss poor decision to discontinue support for a feature that they're still using within automatically generated unit tests against private classes and methods.  But, I think what is worse is the lack of guidance cited in the aforementioned blog post.  Their advice?  Use the PrivateObject to help, but develop your own framework.

At the end of the day what Microsoft is saying is, "I know you spent a lot of money for this product.  I know that you don't have time to develop a framework to deal with this.  We don't have time and that is all that's important."

Posted on Friday, January 28, 2011 7:40 AM .NET , bugs , Visual Studio | Back to top

Comments on this post: InvalidProgramException Running Unit Test (Bug Closed)

# re: InvalidProgramException Running Unit Test (Bug Closed)
Requesting Gravatar...
Has anyone figured out how to keep visual studio from generating a private accessor when you add a new unit test to your project? It seems that if they're depricating this feature, they should turn it off.

Left by shawn on Jul 08, 2011 12:28 PM

Your comment:
 (will show your gravatar)

Copyright © Anthony Trudeau | Powered by: