title: Use string of class name to new a class
body: <p>I want to use a class name sting to new a class</p>
  <p>NameSpace is <code>Mcs.ControlMaster</code></p>
  <p>Class Name is <code>HostTransportCommand</code></p>
  <p>after check some posts here. I use Activator</p>
  <pre><code>var msg = Activator.CreateInstance(Type.GetType(&quot;Mcs.ControlMaster.HostTransportCommand&quot;, true));
  </code></pre>
  <p>got exception</p>
  <pre><code>System.TypeLoadException
    HResult=0x80131522
    Message=Could not load type 'Mcs.ControlMaster.HostTransportCommand' from assembly 'Mcs.ControlMaster.UT, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
    Source=&lt;Cannot evaluate the exception source&gt;
    StackTrace:
  &lt;Cannot evaluate the exception stack trace&gt;
  </code></pre>
  <p>OKAY, the execution assembly is Mcs.ControlMaster.UT now 。and this class is in Mcs.ControlMaster. then</p>
  <pre><code>string fileToLoad = @&quot;Mcs.ControlMaster.exe&quot;;
  AssemblyName assemblyName = AssemblyName.GetAssemblyName(fileToLoad);
  // assemblyName={Mcs.ControlMaster, Version=3.0.19.320, Culture=neutral, PublicKeyToken=null}
  AppDomain myDomain = AppDomain.CreateDomain(&quot;MyDomain&quot;);
  //myDomain={System.Runtime.Remoting.Proxies.__TransparentProxy}
  Assembly myAssembly = myDomain.Load(assemblyName);
  //myAssembly={Mcs.ControlMaster, Version=3.0.19.320, Culture=neutral, PublicKeyToken=null}
  var myFunc = myAssembly.CreateInstance(&quot;HostTransportCommand&quot;);
  // myFunc = null
  </code></pre>
  <p>if use</p>
  <pre><code>Type.GetType(&quot;Mcs.ControlMaster.UT, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null&quot;, true));
  </code></pre>
  <p>will get</p>
  <pre><code>System.IO.FileLoadException: &quot;The given assembly name or codebase was invalid.&quot; 
  </code></pre>
  <p>definition of HostTransportCommand</p>
  <pre><code>namespace Mcs.ControlMaster
  {
      public class HostTransportCommand : JsonMessage
  </code></pre>
  <p>and definition of JsonMessage</p>
  <pre><code>namespace Mcs.Message
  {
    public class JsonMessage : IMcsMessage
  
  namespace Mcs.Message
  {
    public interface IMcsMessage
  </code></pre>
  <p>How to solve this issue？</p>