Hi Mark,
I think it is an exaggeration to say there is "no way" to know what the user intends here.
Unfortunately Windows Installer uses IDs to reference a file in a package. These IDs are generated dynamically based on the package content, so we cannot guarantee that a file will always have the same ID. If the file from the new location uses a different ID, the original reference (for example in a custom action) is invalid.
I'm afraid that there's not much we can do about this. We cannot force a file to always use the same ID and we cannot cache information about all files in the package to determine if the same file was added from a different location.
If the paths in the installer have to effectively be hard-coded to a single location, I do not see how it lends itself to any kind of automation or standard release practices.
Please note installers are usually built around a single disk location, a folder with the application files. For example, a subversion checkout folder. The content of this folder is modified based on your application releases. In your case, the "Release1\bin" folder content should be replaced by the "Release2\bin" content.
You are currently trying to use multiple locations (checkouts) with the same settings, a concept which is not really supported by Windows Installer.
If using the same folder and updating it when necessary is not a solution, you can try using formatted paths instead of file references. For example, you can use:
instead of:
Regards,
Cosmin
FOLLOW US
Get the latest news in Application Packaging