Dll not found starting DataContext driver which use nuget packages

I am attempting to update a DataContext driver written for LinqPad4 so that it will work in LinqPad 8.

I have upgraded the project to compile under net6.0-windows and copied the output to %localappdata\LINQPad\Drivers\DataContext\NetCore

But this uses a component from Xceed's Extended WPF Toolkit (see https://github.com/xceedsoftware/wpftoolkit) and this throws an exception when creating the ConnectionDialog

System.Windows.Markup.XamlParseException: Could not load file or assembly 'Xceed.Wpf.Toolkit.NET5, Culture=neutral, PublicKeyToken=3e4669d2f30244f4'. The system cannot find the file specified.

However this component is in deps.json and looking at Process Monitor, LinqPad does seem to load it successfully.

The inner exception does not show any other dlls so I don't think it is missing another dll that it depends on.

I know the dll references .net5, but whenever I create a new query and manually load this dll from the nuget folder, it loads correctly and also the publicKey is the same in the error message above.

Any ideas how to proceed?


  • Managed to get this working by adding a line like

    var _ = typeof(Xceed.Wpf.Toolkit.DropDownButton);

    before it creates the ConnectionDialog.


  • I've experienced an issue before that I believe was caused by WPF not being entirely ALC-friendly. It's possible that the XAML parser doesn't properly respect the assembly resolution methods of the ALC into which the component is being loaded.

Sign In or Register to comment.