I've been using a custom MSI deployment process for years without a hitch. Recently, I upgraded from VS2005 to VS2017 and tried to deploy a new version of a program using VS2017. Then the weirdness started.
The first odd thing I noticed was that after installing the new version of my program, it wouldn't run. After some investigation, it turns out that the target install folder (in Program Files) was simply gone. The program was still listed in Programs and Features and still "acted" as if it was installed (all menus/shortcuts built by the installer were still there, attempts to rerun the same installer asked me if I wanted to repair or remove, etc), but the install folder itself was gone. After rerunning the same installer to repair it, the target folder was back and the program worked just fine. I tried putting out another new version (with an incremented version number) from VS2017 and that installer worked just fine without a problem.
So, subsequent installs built in VS2017 work just fine, just like subsequent installs built in VS2005 worked just fine. The issue is moving from the last version I built in VS2005 to the first version built in VS2017. I tested this by removing the app, installing the last VS2005 version, and doing an upgrade to a version built in VS2017. The same problem occurs on three different machines.
I think the problem might have something to do with the GUID of the main executable changing in the MSI file (which it did once I built the installer in VS2017), but I'm not sure.
I turned on verbose MSI logging and did a test upgrade (from the last VS2005 version to a VS2017 version) and instead of creating just one log file, it created two. The first said the install was successful, the second said it failed. They were created just a few seconds apart from each other. Here is the end of each log:
=== Logging stopped: 7/6/2017 9:23:12 ===
MSI (c) (7C:EC) [09:23:12:733]: Note: 1: 1707
MSI (c) (7C:EC) [09:23:12:733]: Note: 1: 2262 2: Error 3: -2147287038
MSI (c) (7C:EC) [09:23:12:733]: Note: 1: 2262 2: Error 3: -2147287038
MSI (c) (7C:EC) [09:23:12:733]: Product: TaskRunner -- Installation completed successfully.
MSI (c) (7C:EC) [09:23:12:734]: Windows Installer installed the product. Product Name: TaskRunner. Product Version: 3.3.1059. Product Language: 1033. Manufacturer: WATYF. Installation success or error status: 0.
MSI (c) (7C:EC) [09:23:12:736]: Grabbed execution mutex.
MSI (c) (7C:EC) [09:23:12:736]: Cleaning up uninstalled install packages, if any exist
MSI (c) (7C:EC) [09:23:12:744]: MainEngineThread is returning 0
=== Verbose logging stopped: 7/6/2017 9:23:12 ===
=== Logging stopped: 7/6/2017 9:23:39 ===
MSI (c) (B8:90) [09:23:39:075]: Note: 1: 1729
MSI (c) (B8:90) [09:23:39:075]: Note: 1: 2262 2: Error 3: -2147287038
MSI (c) (B8:90) [09:23:39:075]: Note: 1: 2262 2: Error 3: -2147287038
MSI (c) (B8:90) [09:23:39:075]: Product: TaskRunner -- Configuration failed.
MSI (c) (B8:90) [09:23:39:075]: Windows Installer reconfigured the product. Product Name: TaskRunner. Product Version: 3.3.1059. Product Language: 1033. Manufacturer: WATYF. Reconfiguration success or error status: 1602.
MSI (c) (B8:90) [09:23:39:075]: Grabbed execution mutex.
MSI (c) (B8:90) [09:23:39:075]: Cleaning up uninstalled install packages, if any exist
MSI (c) (B8:90) [09:23:39:075]: MainEngineThread is returning 1602
=== Verbose logging stopped: 7/6/2017 9:23:39 ===
No errors or messages or oddities of any kind appear during the install. It appears to complete as expected. I don't even know for certain that the second installer log is the cause of the problem. It just seems odd that it would be there and say it failed.
The other odd thing that happened was that after doing this, ALL of the .NET programs that I've built and installed on my machines suddenly started acting as if they weren't properly installed any more. I have two other apps (built in VS2005) that are on this machine and after trying to install the new version of the app I built in VS2017, the two other apps try to run an installer whenever I start them (instead of just launching the program). Those two apps haven't been changed in any way. I'm also not entirely sure that this is related, but it seems odd that it would happen at the exact same time as the other issue.
Does anyone know an explanation for any or all of this?