I am using the new mef 2.0 framework however I am having issues loading an Assembly by name. I want to load the assembly by name, and not the path. Could someone point me in the right direction. I am using windows 10 operating system.
private void frmMef2UnitTest_Load(object sender, EventArgs e) { ComposeParts(); } static void ComposeParts() { IList<Assembly> assemblies = new List<Assembly>(3); var executingAssembly = Assembly.GetExecutingAssembly(); assemblies.Add(Assembly.GetExecutingAssembly()); assemblies.Add(Assembly.Load("HelloWorld")); // I get the error at this line var loader = new MefLoader(assemblies); loader.ComposeAllParts(); }