title: Activator.CreateInstance(string, string) throwing TypeLoadException
body: <p>I have the following code:</p>
  
  <pre><code>public static void Invoke(string assemblyName, string scheduledTaskExecutorName)
  {
      ObjectHandle objectHandle = Activator.CreateInstance(assemblyName, scheduledTaskExecutorName);
      IScheduledTaskExecutor scheduledTaskExecutor = (IScheduledTaskExecutor)objectHandle.Unwrap();
      scheduledTaskExecutor.ExecuteScheduledTask();
  }
  </code></pre>
  
  <p>I have a class called <code>DummyScheduledTaskExecutor</code> which looks like this:</p>
  
  <pre><code>public class DummyScheduledTaskExecutor : IScheduledTaskExecutor
  {
      public void ExecuteScheduledTask()
      {
          DummyTextFile.Text = "Success!";
      }
  }
  </code></pre>
  
  <p>It resides in an assembly whose assembly name (as defined in the assembly's properties) is <code>Tests.WebApplication.Application.Unit</code>.</p>
  
  <p>My call to <code>Invoke(string, string)</code> looks like this:</p>
  
  <pre><code>ScheduledTaskInvoker.Invoke("Tests.WebApplication.Application.Unit", "DummyScheduledTaskExecutor");
  </code></pre>
  
  <p>Trying to run this code just throws a TypeLoadException. Have I expressed the assembly or type name incorrectly, or is something else going on?</p>