我有一个名为 test 的 dll,在 test.dll 中,我引用了另一个名为 process 的 dll。现在,当我尝试加载 test.dll 时,我收到错误“系统找不到 process.dll。请帮助
Assembly u = Assembly.LoadFile(@"C:\test\test.dll");
Type t = u.GetType("Test.Process");
MethodInfo m = t.GetMethod("ProcessFile");
try
{
object[] myparam = new object[1];
myparam[0] = @"C:\test\testFile.csv";
result = (string)m.Invoke(null, myparam);
Console.WriteLine(result);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message.ToString());
Console.WriteLine(ex.InnerException.ToString());
System.Threading.Thread.Sleep(100000);
}