Dealing with Assembly-Sharing Issues

Both the previously described techniques have an impact on the use of shared assemblies. Shared assemblies are those that are loaded into multiple appdomains and, although they are logically distinct from one another, share the same compiled code. This is an optimization that reduces the amount of memory needed to hold the compiled versions of the assembly's methods and also the time needed to compile (JIT) them.

There are three styles of assembly sharing that can be enabled (these can all be configured through XML application configuration files, which are beyond the scope of this book):

  • Share nothing except mscorlib (this library is always shared).

  • Share only strongly named assemblies.

  • Share all assemblies. ...

Get .NET Framework Security now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.