title: Assembly.CreateInstance to resolve IoC Container
body: <p>I am trying to create an instance of a class (at runtime via a string) using the following code:</p>
  
  <pre><code>Assembly assembly = Assembly.GetAssembly(typeAssembly);
  object instance = assembly.CreateInstance(typeName); //throws MissingMethodException
  Type classType = instance.GetType();
  </code></pre>
  
  <p>However, the class I'm trying to instantiate has two parameters in the constructor which is resolved by the Unity IoC container.</p>
  
  <p>When I execute the above code, it throws 'System.MissingMethodException'.</p>
  
  <p>I have searched around the web and it appears that Assembly.CreateInstance won't be able to resolve Unity dependency-injection.</p>
  
  <p>Is this a dead-end or is there a way I can instantiate the class using "CreateInstance" method AND resolve the Unity dependencies?</p>