You can load all the active assemblies in the app domain, then walk each assembly's types looking for a name match. Without the assembly name though, you can't use Type.GetType()
as you saw.
The following simple program works for me.
class Program
{
static void Main(string[] args)
{
Console.WriteLine(GetFqTypeName("IMyInterface"));
Console.ReadKey();
}
static String GetFqTypeName(string shortTypeName)
{
return AppDomain.CurrentDomain.GetAssemblies()
.ToList()
.SelectMany(x => x.GetTypes())
.Where(x => x.Name == shortTypeName)
.Select(x => x.FullName)
.FirstOrDefault();
}
}
public interface IMyInterface { }