title: Type.GetType not finding a type by name
body: <p>I'm trying to use StructureMap to perform runtime type registration, and I'm having trouble locating types in the referenced assemblies using <code>Type.GetType()</code>.  Here is the full code of my test app:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using StructureMap;
  using StructureMap.Configuration.DSL;
  using StructureMap.Graph;
  
  namespace ConsoleApplication1 {
      class Program {
          static void Main(string[] args) {
              ObjectFactory.Initialize(r =&gt; r.Scan(
                  s =&gt; {
                      s.AssembliesFromPath(
                          @"c:\Path\To\MyClasses\bin\Debug");
                      s.Convention&lt;MyConvention&gt;();
                  }
                                                ));
  
              ObjectFactory.AssertConfigurationIsValid();
  
              foreach (var name in MyConvention.assemblyQualifiedTypenames) {
                  Console.WriteLine(name);
                  Console.WriteLine("Type found for reflection by assembly qualified name: {0}", Type.ReflectionOnlyGetType(name, false, false) != null);
                  Console.WriteLine("Type found by assembly qualified name: {0}", Type.GetType(name) != null);
                  Console.WriteLine("Type found by search: {0}",
                      AppDomain.CurrentDomain.GetAssemblies().ToList()
                      .SelectMany(assembly =&gt; assembly.GetTypes().Where(t =&gt; t.AssemblyQualifiedName == name))
                      .FirstOrDefault() != null
                  );
              }
              Type type = null;
              foreach (var name in MyConvention.fullnames) {
                  Console.WriteLine(name);
                  Console.WriteLine("Type found by full name: {0}", Type.GetType(name) != null);
                  Console.WriteLine("Type found by search: {0}",
                      AppDomain.CurrentDomain.GetAssemblies().ToList()
                      .SelectMany(assembly =&gt; assembly.GetTypes().Where(t =&gt; t.FullName == name))
                      .FirstOrDefault() != null
                  );
              }
              foreach (var name in MyConvention.typenames) {
                  Console.WriteLine(name);
                  Console.WriteLine("Type found by name: {0}", Type.GetType(name) != null);
                  Console.WriteLine("Type found by search: {0}",
                      (type = AppDomain.CurrentDomain.GetAssemblies().ToList()
                      .SelectMany(assembly =&gt; assembly.GetTypes().Where(t =&gt; t.Name == name))
                      .FirstOrDefault()) != null
                  );
              }
              Console.ReadLine();
              var instance = ObjectFactory.GetInstance(type);
              Console.WriteLine("Type instance retrieved from StructureMap: {0}", instance != null);
              Console.ReadLine();
              ObjectFactory.WhatDoIHave()
                  .Split(new [] { Environment.NewLine}, StringSplitOptions.None)
                  .Where(s =&gt; s.Contains("Class2")).ToList()
                  .ForEach(Console.WriteLine);
              Console.ReadLine();
          }
  
          private class MyConvention : IRegistrationConvention {
              public static List&lt;string&gt; typenames = new List&lt;string&gt;();
              public static List&lt;string&gt; fullnames = new List&lt;string&gt;(); 
              public static List&lt;string&gt; assemblyQualifiedTypenames = new List&lt;string&gt;(); 
              public void Process(Type type, Registry registry) {
                  if (type.GetCustomAttributes(false).Any(o =&gt; o.GetType().Name == "MyClassAttribute")) {
                      registry.For(type).Use(type);
                      typenames.Add(type.Name);
                      fullnames.Add(type.FullName);
                      assemblyQualifiedTypenames.Add(type.AssemblyQualifiedName);
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>The test class definitions:</p>
  
  <pre><code>namespace MyAttributes {
      public class MyClassAttribute : Attribute { }
  }
  
  namespace MyClasses {
      public class MyClass1 { }
  
      [MyClass]
      public class MyClass2 { }
  }
  </code></pre>
  
  <p>The output from running the console app:</p>
  
  <pre>
  MyClasses.Class2, MyClasses, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  Type found for reflection by assembly qualified name: False
  Type found by assembly qualified name: False
  Type found by search: True
  MyClasses.Class2
  Type found by full name: False
  Type found by search: True
  Class2
  Type found by name: False
  Type found by search: True
  
  Type instance retrieved from StructureMap: True
  
  Class2 (MyClasses.Class2)                60eb30ad-ae50-413d-884f-04743ea3148c
    Configured Instance of MyClasses.Class2, MyClasses, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
                                           60eb30ad-ae50-413d-884f-04743ea3148c
    Configured Instance of MyClasses.Class2, MyClasses, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  </pre>
  
  <p>I've done all of the testing based on <a href="https://stackoverflow.com/questions/2426752/get-instance-from-structuremap-by-type-name">this SO post</a> - am I missing something fundamental?</p>