I came across an nasty bug in the Microsoft .NET Framework 1.1 today.
Here is a program that reproduces the problem:
static void Main(string args)
if(AppDomain.CurrentDomain.FriendlyName != "My 2nd Domain")
AppDomain dom = AppDomain.CreateDomain("My 2nd Domain");
foreach(Assembly a in AppDomain.CurrentDomain.GetAssemblies())
In the 2nd AppDomain (the first one that prints), the list of assemblies doesn't contain System.Data, even though it clearly is present in the AppDomain, after all, the new System.Data.RowNotInTableException() was just executed.
The problem only occurs when assemblies are shared across AppDomains (this is what the [LoaderOptimization(LoaderOptimization.MultiDomain)] attribute does). Comment out that line and the program works as expected.
I think that this effectively means that IKVM cannot be used inside of ASP.NET, which, I believe, always loads assemblies domain neutral.
In the May 2004 Community Technology Preview of Visual Studio 2005, the bug is fixed and the above program performs as expected.
I apologize for the lameness of this, but the comment spam was driving me nuts.
In order to be able to post a comment, you need to answer a simple question. Hopefully this question
is easy enough not to annoy serious commenters, but hard enough to keep the spammers away.
Anti-Spam Question: What method on java.lang.System returns an object's original hashcode (i.e. the
one that would be returned by java.lang.Object.hashCode() if it wasn't overridden)? (case is significant)
Powered by: newtelligence dasBlog 2.3.12105.0
© Copyright 2017, Jeroen Frijters