C#: Could not load type "IPluginService.PluginService" from assembly
<p>I am creating a Steam chat bot using the steamkit2 framework in c# and I want the bot to be able to load the chat commands dynamically during runtime without having to restart.</p>

<p>This is what I have.</p>

<pre><code>public static void LoadChatPlugins()
{

    var currentPath = Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(typeof(Rush)).Location);
    string[] files = Directory.GetFiles(currentPath + "\\plugins\\", "*.dll");

    BootStrapper = new List&lt;PluginService&gt;();
    int NumberOfPlugins = 0;

    Type t = typeof(PluginService);

    PluginDomain = AppDomain.CreateDomain("Plugin Domain");

    foreach(var dll in files)
    {
        BootStrapper.Add((PluginService)PluginDomain.CreateInstanceFromAndUnwrap(dll, t.FullName));
    }

    NumberOfPlugins = BootStrapper.Count();

    // Do stuff with each plugin
}
</code></pre>

<p>This is the plugin type I want to import.</p>

<pre><code>namespace Rush
{
    [Export(typeof(IPluginService.PluginService))]
    public class Plugin : BaseCommands, PluginService
    {
    }
}
</code></pre>

<p>This is the interface and base class.</p>

<pre><code>namespace IPluginService
{
    public interface PluginService
    {
    }

    public class BaseCommands : MarshalByRefObject 
    {
    }
}
</code></pre>

<p>So what I am doing is trying to load all the plugins into a separate appdomain so they can be unloaded during runtime. Am I doing something wrong or what? This is the exact error I get.</p>

<blockquote>
  <p>Additional information: Could not load type 'IPluginService.PluginService' from assembly 'BasicCommands, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'</p>
</blockquote>
