I have a Windows, C++ software project (built with Visual Studio 2005, SP1) that has the following (simplified) file layout:
{App. Root Directory}
|-- bin
| |-- Microsoft.VC80.CRT
| +-- Microsoft.VC80.MFC
+-- utils
There are various executables that live in both the bin and utils directories. Each of these executables rely on the side-by-side assembly (C++ run-time DLLs) that we store in bin, but we have segregated them into these separate folders for various reasons (e.g., the exes in the utils folder are supplemental tools to our primary application, and are run infrequently). As a direct result of this file organization, the apps in the utils folder fail to run on systems that don't already have the appropriate side-by-side assembly installed (they fail with the usual "The system cannot execute the specified program" error message).
My Question: Is there a way I can tell the apps in the utils folder to explicitly look in the ..\bin
folder for the appropriate side-by-side assembly? The Assembly Searching Sequence article at Microsoft makes no mention of this being possible or not. Is there a clever way I can fix this run-time requirement for these applications?
Potential Options I See:
- Place a copy of the side-by-side assembly into the utils folder. This could be done at run-time (to prevent bloating our application installation package), but seems a little dirty.
- Statically link the run-time DLL's. I don't want to do this!
- Have the end user install the usual redistributable package. I'd rather not do this either.