在Rehosting 中引用Localservice 方法......

            //从配置文件中获得LocalServiceDLL列表 GeneralXU 07-04-19
            XmlEditClass xmlEditClass = new XmlEditClass(Application.StartupPath + @"\test.xml", XmlEditClass.enumXmlPathType.AbsolutePath);
            Hashtable hashtable = new Hashtable();
            hashtable = xmlEditClass.getAllChildNodesInfo("LocalServiceNode");
            foreach (DictionaryEntry de in hashtable)
            {
                //增加一个External Interface class 的引用 GeneralXu 07-04-19
                typeProvider.AddAssemblyReference(Application.StartupPath + @"\"+de.Value.ToString());
            }
原文地址:https://www.cnblogs.com/GeneralXU/p/720311.html