In some scenarios the same unmanaged DLL is resolved multiple times
(e.g. when using System.Data.SQLite.SQLiteConnection). The previous
implementation would then try to create new shadow copies of the same
DLL during subsequent resolves. This failed during copy of the DLL since
the parameter to enable overwriting was not set to true.
This fix checks if the shadow copy already exists and skips the copy
step if it does. The path to the existing shadow copy is returned
instead.
Fixes#146
* debounces FileSystemWatcher events
* makes debounce interval configurable
* ignores SQL timeout in unit tests (the purpose is to load the native libraries, not the actual connection to the database)
Recursively load and find all dependencies of default assemblies. This sacrifices some performance for determinism in how transitive dependencies will be shared between host and plugin.
Fixes#41
This removes support for configuring the plugin via XML. It's better to do most of the plugin configuration programmatically. Some settings, such as assemblies to share, have to be expressed via code and can't be expressed in XML. There weren't enough use cases for changing the plugin config via file post-publish, so I'm simplifying the library by removing this.
Add PluginLoader.IsUnloadable and other related API to allow opting in
to an unloadable plugin. Under the hood, this relies on a feature of
.NET Core 3 -- collectible assembly load contexts.
This fixes assembly loading for System.Drawing.Common. This package was a rare case of a package with both runtime agnostic and runtime-specific versions of the managed library. This means the .NET Core SDK will dump System.Drawing.Common.dll in the plugin base path *as well as* a version in the runtimes/ folder. In this case, corehost actually treats the runtime specific asset with higher priority.
This change updates the ManagedLoadContext to imitate this behavior.