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);
}