我必须从网络共享加载一个程序集,但我得到了一个异常:
17.08.2011 9:50:50: Exception: TargetInvocationException - "Exception has been thrown by the target of an invocation."
System.Object _InvokeMethodFast(System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.R
如何为当前正在执行的程序集或Type中未定义的类型获取mscorlib.dll类的实例?
( a)也就是说,我在程序集someType中定义了一个类类型CSharpSnapIn.dll,位于E:\CSharpSnapIn.dll,但由于某种原因,当我试图指定该程序集的绝对路径时,会得到一个异常:
Type t = Type.GetType("someType, E:\\CSharpSnapIn.dll"); // exeception
( b)我也尝试过将CSharpSnapIn.dll放入当前正在运行的应用程序的\bin\debug目录中,但仍然有一个例外:
Type t =