Skip to content

1.4.1

Compare
Choose a tag to compare
@mikoskinen mikoskinen released this 03 Jun 12:51
· 11 commits to master since this release

New features:

Support for resolving native and platform specific DLLs in NugetPackagePluginCatalog

The NugetPackagePluginCatalog can now resolve native and platform specific DLLs. It also can resolve the best matching DLL inside a Nuget package with more accuracy than before.

This functionality allows the usage of packages like Microsoft.Data.SqlClient as plugins.

Option to provide AssemblyHints to PluginAssemblyLoadContext

PluginAssemblyLoadContext is the class which loads the correct DLLs. It is now possible to provide AssemblyHints to this functionality. The hints can be used to fine tune the DLLs which the PluginAssemblyLoadContext loads.

For example if your system requires as MySystem.dll from the root of your application folder and you know that runtime you actually want to use the MySystem.dll from c:\temp, you can provide the following hint to the context:

var runtimeAssemblyHint = new RuntimeAssemblyHint(fileName: "MySystem.dll", path: @"c:\temp\MySystem.dll", isNative: false);

Hints can be provided through the catalog's PluginLoadContextOptions:

var runtimeAssemblyHint = new RuntimeAssemblyHint(fileName: "MySystem.dll", path: @"c:\temp\MySystem.dll", isNative: false);

var opt = new FolderPluginCatalogOptions();
opt.PluginLoadContextOptions.RuntimeAssemblyHints.Add(runtimeAssemblyHint);

var folderCatalog = new FolderPluginCatalog(@"c:\dev\mysystem\bin", opt);