我正在尝试使用以下代码在我的项目中加载旧版本的 farpoint dll
System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFile(@"FarPoint.Web.Spread.dll");
System.Type MyDLLFormType = assembly.GetType("FarPoint.Web.Spread.FpSpread");
var c = Activator.CreateInstance(MyDLLFormType);
问题是在创建实例后,farpoint 的所有可用方法都不可用[例如-如果我直接创建对象,则实例可以使用 saveExcel 或 savechanges 等方法]
FpSpread fpProxyObject = new FpSpread();
fpProxyObject.SaveExcel();