Whidbey breaking change --- Caching binding failures
This is one of the breaking change mentioned in gotdotnet.com's break change from .Net 1.1 to 2.0
Cache load failures in order to ensure that different app domains do not have different dependency loading success/failure characteristics in domain neutral sharing scenarios
https://www.gotdotnet.com/team/changeinfo/Backwards1.1to2.0/default.aspx#00000067
What does it mean?
Say you call Assembly.Load(”Foo, version=1.0.0.0, culture=neutral, publicKeyToken=0123456789abcdef”), you get a FileNotFoundException. You realize that foo.dll should be in GAC but you forget to install it. So you install it (using gacutil.exe or some other mechanism) to GAC. Now you call Assembly.Load(“Foo, version=1.0.0.0, culture=neutral, publicKeyToken=0123456789abcdef“) again.
In v1.0/v1.1, the second load will succeed. In Whidbey, the second load will fail.
Installing to GAC is just an example. As long as the first bind failed, the second bind will fail with exactly the same exception.
The caching is done on per AppDomain basis. If you create a new AppDomain and call Assembly.Load() on that app domain, it will succeed.
Comments
Anonymous
July 22, 2004
The comment has been removedAnonymous
July 22, 2004
The comment has been removedAnonymous
July 22, 2004
Chris Brumme told me that he discussed domain neutral assemblies here in his AppDomain blog:
http://blogs.msdn.com/cbrumme/archive/2003/06/01/51466.aspx
It goes into great detail about the design of domain neutral assemblies: what is domain neutral assemblies, why it is introduced, what are its advantage and disadvantage.
This caching binding failure behavior is more about how domain neutral assemblies is implemented, and is not totally covered by Chris's blog.Anonymous
March 13, 2006
In .Net framework 2.0, we will cache assembly loading failures. (See http://blogs.msdn.com/junfeng/archive/2004/07/22/190813.aspx for...Anonymous
May 26, 2009
PingBack from http://castironbakeware.info/story.php?title=junfeng-zhang-s-windows-programming-notes-whidbey-breaking-changeAnonymous
May 29, 2009
PingBack from http://paidsurveyshub.info/story.php?title=junfeng-zhang-s-windows-programming-notes-whidbey-breaking-change