Hi All,
I am building an unmanaged CLR Host and have a very specific question regarding the loading of mymanaged AppDomainManager assembly via an unmanaged IHostAssemblyStore implementation. Specifically I can't seem to get the CLR to load my AppDomainManager assembly through my IHostAssemblyManager component.
I specify my AppDomain Manager type on the ICLRControl interface as I am supposed to:
...
hr =pCLRControl ->SetAppDomainManagerType(L"MyManagedAppDomainManager, Version=1.0.0.0, PublicKeyToken=9ab418b2d23c1abd, ProcessorArchitecture=MSIL",
L" MyManagedAppDomainManager.MyAppDomainManager");
...
If I include this type in the list of assemblies returned by IHostAssemblyManager::GetNonHostStoreAsemblies(), the CLR looks for the assembly/type in my application directory, finds it and loads it no problem.
However, if I remove this type from the non-host store assemblies list, the above line throws a C++ EEFileLoadException error. I don't expect this. I expect my IHostAssemlbyStore::ProvideAssembly() implementation to get called to provide the assembly, and it doesn't.
Note that in the first case (where I include the assembly in the non-host store assemblies list), once my AppDomainManager assembly loads, all other assemblies not specified in the list are redirected to my IHostAssemblyStore::ProvideAssembly() implementation as they are supposed to be. I just can't seem to get the CLR to call this method for the AppDomainManager assembly itself.
Is this supported?
Many thanks,
Rod da Silva