in a C# application i load another application via
Assembly assembly = Assembly.LoadFrom("tool.dll");
and then run it via
Type typeGame = assembly.GetType("com.Program");
object instanceOfMyType = Activator.CreateInstance(typeGame);
typeGame.InvokeMember("Run", BindingFlags.InvokeMethod, null, instanceOfMyType, null);
this loaded application loads files from its current working directory, which works fine when run alone.
but when it is loaded into another application like above it gives FileNotFoundExceptions, even though the working directory is correct and the file is there.
also if i output the working directory via
Console.WriteLine(Directory.GetCurrentDirectory());
it tells me the correct directory where the file resides.