Пытаюсь динамически подключить библиотеку dll. Использую Assembly:
using System.Reflection;
...
public MainWindow()
{
InitializeComponent();
Assembly a = Assembly.Load("file");
}
Вылазит ошибка "Не удалось найти указанный файл", имя файла совпадает с тем что пытаюсь открыть.
Если использую LoadFrom, то вылазит это:
System.BadImageFormatException: "Could not load file or assembly 'file, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (0x80131058)"