Package Version is changed from "1.0.1" to "1.0.2"
MajorUpgrade is scheduled as "afterInstallExecute".
Running only the MSI 1.0.2 installs the version correctly.
Running the MSI 1.0.1 installs the version correctly. But running MSI 1.0.2 after it, does not replace the executable file.
(If MSI 1.0.2 is executed with writing to log, searching the executable name in the log, leads to the following line: The file represented by File table key 'MyExecutable.exe' has no eligible binary patches)
First: The executable is .NET 8 stand alone application. Its own "version" is not changing. But the file "content" is different. Does the MSI just check the version of the executable, and conclude that there are no "binary patches"?
Second: Do you have any idea how to fix / force replace / work around this?
6 Days later...
While I was looking for alternative installer to solve my problem, I come across this guide:
https://www.advancedinstaller.com/user-guide/control-events.html#section133
The specific information that I needed:
Set reinstall mode - ReinstallMode This event allows the author to specify the validation mode or modes during a reinstall. For the Argument field it can use a combination of these values:
o - reinstall if the file is missing or is an older version
e - reinstall if the file is missing or is an equal or older version
As it turns out, my current project actually supports this.
And now that I knew what I have to do, I did additional search, and as it turns out, people are using this:
One line in the code for setting REINSTALLMODE to "emus" and everything does what I want it to do:
User edited files survive upgrade. Binaries get overridden even with same version.