Closed mikoskinen closed 4 years ago
The pull request takes care of adding the shared frameworks used by host application into to the assembly resolver.
This should remove the need of having to define AdditionalRuntimePaths in many situations. If your host app is WinForms and your plugin uses WinForm dlls, AdditionalRuntimePaths isn't needed any more.
But, in situations where the plugin is using shared framework (Desktop / ASP.NET Core) and your host application isn't, AdditionalRuntimePaths is still needed. This can happen for example if your Console App points to a folder where DLL's require references to Microsoft.WindowsDesktop.App (C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\3.1.5).
Issue:
The future version should automatically try to resolve the additional runtime/shared paths/frameworks required by the plugins:
Relates to #21 where we had to manually add additional runtime path:
The AspNetCore-library also has this:
Without these, the plugins can't load all the required DLLs.
Possible solution:
It might be possible to use MetadataReference to get the references. For example:
This must be done recursively to find all the referenced assemblies and their locations. This info is then added to PathAssemblyResolver in FolderPluginCatalog.