Based on my understanding, it seems that any relative URI will depend on the
current working directory of your application to obtain the complete path; therefore, if the current working directory of your application is changed, it's expected that it could not find the corresponding files.
I am not aware of your current scenario or why the current working directory of your application is changed, but as a possible approach you could change the
current working directory when the modules need to be loaded (for example, before running the
Bootstrapper or when a module marked as "OnDemand" needs to be loaded) and change it back when the modules have been loaded.
For example, if I am not mistaken, you can obtain the path of where your application (the .EXE
file) is located by doing something like this:
string directoryName = new FileInfo(Assembly.GetExecutingAssembly().Location).DirectoryName;
Therefore, when loading modules (for example, before running the Bootstrapper), I believe you can save the current working directory of your application, change it to the directory where your application is currently stored, load the required
modules, and then change it back to the previous working directory.
If this is not possible in your scenario, it would be helpful if you could provide us with more information about it so that we can help you further with this.