You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried this library now with a simple plugin. All my projects reference net8.0-windows as I need WPF user controls in my plugins.
But in not a single project i am in any way referencing System.Data.SqlClient, i am not using it... So why does it throw exception when trying to create a loder?
thanks
The text was updated successfully, but these errors were encountered:
Okay, I have tracked the issue down to where the problem comes from. In my Plugin contract I have a reference to System.Windows.Controls.TabItem like this:
public interface IPlugin
{
string Name { get; }
TabItem? TabItem { get; }
}
Plugin Implementation as simple as this:
public class Class1 : IPlugin
{
public string Name => "TEST PLUGIN";
public TabItem? TabItem { get; } = new TabItem()
{
Header = "NModbus",
Content = new ContentControl()
};
}
As soon as I have that TabItem reference in there, I get this error when trying to create a loader from that plugin:
I am seeing the same issue. It's almost as if the Context Loader can't find the locally installed .NET framework. Did you happen to find any answer to this? @johmarjac
I found a quick workaround was to use this configuration option:
var loader = PluginLoader.CreateFromAssemblyFile(file, config => config.PreferSharedTypes = true);
This has various implications which are explained - I could find the link tomorrow if you don't have it - but gets it working nicely!
Hello,
I have tried this library now with a simple plugin. All my projects reference net8.0-windows as I need WPF user controls in my plugins.
But in not a single project i am in any way referencing System.Data.SqlClient, i am not using it... So why does it throw exception when trying to create a loder?
thanks
The text was updated successfully, but these errors were encountered: