日期:2014-05-18 浏览次数:20433 次
//创建新的Domain domain = AppDomain.CreateDomain(name, null, AppDomain.CurrentDomain.BaseDirectory, "bin", true);//由于web一定会引用到这个DLL,所以这里直接写死到bin目录下 Type type = typeof(SmartPluginInstanceFactory); //创建工厂实例化 [如果DLL在web的bin下就加载不了] factory = (SmartPluginInstanceFactory)domain.CreateInstance(type.Assembly.FullName, type.FullName).Unwrap(); //factory = (SmartPluginInstanceFactory)domain.CreateInstanceFromAndUnwrap("这里是路径", type.FullName);