I have a console application (NGameHost) running in a specific directory (C:\Program Files\NetworkGame3\api\). It uses the files available in that directory and the console application works well when run on its own. It also exposes various methods that use the DLLs (and other files such as config files) from that directory. I now have another console application (located elsewhere) that tried to call those methods and return the results. I’ve set Copy Local: False so that it executes within that directory instead of creating a local version. However I get the error “Could not load file or assembly … or one of its dependencies. The system cannot find the file specified.”
How can I call the methods from a console application located in another directory?
When you set copy local = false what you’re saying is that do not copy the assembly to the local directory in which case assembly will available in one of the places where the runtime looks for it.
See How the runtime locates assembly
Your assembly has to be either in GAC or in one of the probing locations.