Geeks With Blogs


View Anthony Trudeau's profile on LinkedIn

Add to Technorati Favorites

Anthony Trudeau

I hope my weblog doesn't turn into the Visual Studio 2005 bug site.  But, I've ran into some additional anomalous behavior.

The problem occurred when I was unit testing some classes in Visual Studio.  The project is a class library (Library A) that accesses another class library (Library B) that is not part of the solution.  Now the crux of the problem is that Library B was recently converted for use under 2.0.  I have this library (different Framework versions) in different project folders.  And the library converted fine and testing on it went fine; there's no problem there.  Neither of the versions are in the GAC.  So, there shouldn't be a problem with using one or the other right?

Wrong.  It took me awhile to notice, but when I select the 2.0 version of Library B (remember in totally different project locations) it automatically selects the 1.1 version of Library B.  Why?  At first I was really puzzled, and I thought it was selecting the release build instead of the debug build which I chose.  But, then I noticed the Framework version in the Properties dialog for the reference and realized what was going on.

I still don't know why this occurred  But, I was able to resolve the problem by deleting the bin and object directories within the 1.1 version of Library B's project folder tree.  Maybe I'm missing something, but this seems like very bizarre behavior.  I'm a little concerned going forward, because in the future it may not be an option to remove the bin and object folders for backwards support purposes.

Posted on Thursday, December 1, 2005 7:36 AM .NET | Back to top

Comments on this post: Odd library selection behavior

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Anthony Trudeau | Powered by: