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.