Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for working with plugins/dynamic assembly loading #101

Open
tillig opened this issue Mar 26, 2020 · 0 comments
Open

Docs for working with plugins/dynamic assembly loading #101

tillig opened this issue Mar 26, 2020 · 0 comments

Comments

@tillig
Copy link
Member

tillig commented Mar 26, 2020

Autofac isn't responsible for loading assemblies, that's the framework's responsibility. However, because folks wire up their plugins using a DI framework it's a common misconception that when an assembly fails to load or isn't found that it's an Autofac problem.

We need some docs that explain a few things:

  • Clarify that assembly loading isn't an Autofac concern.
  • Point out the example we have for simple .NET Core handling (which is not a recommendation, just a quick example).
  • Point out the docs on ASP.NET MVC Classic plugin assemblies as well as the IIS Restart problem
  • Note that there are a lot of considerations in designing a plugin framework and how none of these are built into Autofac:
    • Application type - different apps need different plugin mechanisms
    • Assembly location - how plugin assemblies get found
    • Plugin dependencies - how dependencies for plugins get resolved, particularly if they conflict
    • Security - potential need for loading assemblies in a safe context prior to loading them completely
    • Framework differences - .NET desktop might load everything in the bin folder automatically for a console app, but that isn't the same as how .NET desktop handles IIS apps (i.e., BuildManager and referenced assemblies), and that's not the same as how .NET Core locates and loads assemblies

Likely this is an FAQ sort of doc since it's not something we support (i.e., "Advanced Topics") and it's not application-specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant