I have a defined a dictionary and when try to store the Activator.CreateInstance, its says Object reference not set to an instance of an object.
public static Dictionary<string, object> AssemblyInstances { get; set; }
var typeA = Assembly.LoadFile(assemblyPath).GetTypes()[0];
var instance = Activator.CreateInstance(typeA) as ISomeInterface;
AssemblyInstances.Add("Implementation", instance);
Any ideas how can I cache the instances for later use.
Thanks,