MSI does not install all files when RemovePreviousVersion is run

前端 未结 4 1192
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-13 21:45

I have a MSI build using WiX version 3.

All previous installers for the product we are deploying worked fine with the configuration specified (that is: if previous v

4条回答
  •  醉梦人生
    2020-12-13 21:54

    I know this is an older thread, but I encountered a similar problem that was not covered by the solutions. In my case, I had a DLL that was actually a lower number version than its predecessor. This DLL would never appear on an upgrade install. Running

    msiexec /i myproduct.msi /l*vx install2.log
    

    and checking the log showed that the file never was installed. It just did not appear in the log as one of the files installed. The MSI definitly contained the file, the best evidence being that a Repair would place the file. Also, exploding the MSI with various tools showed the file present. A straight install on a clean machine would always work.

    This did not help:

    msiexec /i myproduct.msi REINSTALL=ALL REINSTALLMODE=amus /l*vx install3.log
    

    I am building the MSI with Wix, and I have been using this script for many years. Most recently we set the script to completely delete the old directory in our 5.3 version. This had worked to 5.2 -> 5.3 and 5.3 -> 5.4 upgrades. But with the 5.5 version, the DLLs were all rebuilt with new versions of the DLLs. The DLL projects were hosted in GitHub. The build script for this particular DLL was set to be an assembly version of '10.0.0.{git rev-list --count HEAD}'. The project had been moved, causing the HEAD count to go from 444 to 30.

    The wixscript include has this,

    define ProductGuid = "{nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn}"
    

    so we update the product guid (not the product upgrade guid) on each release.

    The remedy was to slightly change the build script of this dll to set the assembly version to go to '10.0.1.{git rev-list --count HEAD}', presumably being treated as a higher numbered version.

    Why this worked, I am unable to explain.

提交回复
热议问题