-
-
Notifications
You must be signed in to change notification settings - Fork 241
Description
(I titled this as a question for now, as I'm not yet sure whether this is actually a feature request, or I'm just on the wrong train of thoughts, and my problem can actually be solved easily with existing functionality.)
We're currently working on a plugin system for a new .NET 8 based application. The previous application (started back with the early prereleases with .NET Framework 2, and now on .NET Framework 4.8) had a concept called interface assemblies. The plugins had been separated and mostly isolated, including their dependencies (heavy use of strong naming and GAC). The interfaces (and other common types like enums and exceptions) used by the plugins to communicate with each other and the host were in designated "interface assemblies" assemblies, collected in a common folder, overwritten using a "highest version wins" policy by the plugin installer.
In the new host, we want to achieve a similar effect, but we don't want to overwrite the interfaces during installation, but keep them in separate folders next to each other, and just load the newest available version on startup (probably using some cache file for speedup).
Now I see that in DotNetCorePlugins, we can specify "shared types" on a "type by type" granularity, or a default "PreferSharedTypes" flag. To achieve a similar effect with the interface assemblies, it might be useful to designate whole assemblies for being shared, instead of just single types.
Describe alternatives you've considered
- Enumerating all types in the shared interface assemblies and pass them as "Shared Types", probably very slow.
- Writing our own loader code from scratch (lots of work, but we might end up doing this for other reasons anyway).
I'd be grateful for any thoughts / suggestions.