How to specify assembly loading in application domain neutral mode

Is there a way to tell the CLR to load the class library assembly as a neutral domain? A use case is MSCRM plugins, in which each plug-in is loaded into a separate application domain and needs the services of a β€œuseful” library, which can be quite large (10+ megabytes), and it would be neat to be able to load one copy of the code page, which is common to all application domains, thereby reducing the memory size of the entire process.

+4
source share
1 answer

You can load the assembly as neutral for the domain, you need to apply the LoaderOptimization attribute as MultiDomain. Check out the article to find out how to do this.

+1
source

All Articles