ContainerBuilder builder = new ContainerBuilder(); ////builder.RegisterType<GetTest>().As<IBufrTest>(); //builder.RegisterType<GetTest>().AsImplementedInterfaces(); //builder.RegisterType<gettest2>().As<IBufrTest>(); string dllFIle = System.IO.Directory.GetCurrentDirectory() + "\DemoBufr.dll"; builder.RegisterAssemblyTypes(Assembly.LoadFile(dllFIle)).AsImplementedInterfaces(); IContainer resorlver = builder.Build(); var test = resorlver.Resolve<IEnumerable<IBufrTest>>(); StringBuilder sbtext = new StringBuilder(); foreach (var item in test) { sbtext.Append(item.getstring()).Append(" "); } string ttxt = sbtext.ToString(); Console.WriteLine(ttxt); Console.ReadKey();