I use Visual Studio 2015 Setup Project to install my application which supports upgrade. I performed below tasks: 1) I copied test.xml file in program files location through installation 2) I modified test.xml today 3) I perform upgrade for the application where customer requirement is to copy/over write test.xml(no matter it is latest or not) file with package file (assume package file is modified yesterday)
As the existing file is latest than package file, installation is not over-writing the file at all.
Hence, I tried to delete this file in OnBeforeInstall() so that the new file would be copied in OnAfterInstall(). But, unfortunately, installer does call the custom action event handlers after copying files.
Then, I found there is property called
Condition
Which I defined 1 (True) so that irrespective existing file's modification time, installer could over-write the file. But that also didn't work out. Seems like after the condition evaluates to true, still installer applies file time stamp check and it doesn't copy if the existing file is latest.
Hence, please let me know is there any other way to make this work!