In-Use Files Not Updated by Msi-Installer (Visual Studio Installer Project)

In-use files not updated by MSI-installer (Visual Studio Installer project)

This isn't a solution to the problem, but rather another solution; the one requiring the least work in the end.

I ended up not using 'Visual Studio Installer Projects' for my installer. Instead I looked to Advanced Installer, which just works with no issues. Things like this is taken into account, and custom actions allow for more options.

If your project is open source, you can write to them about a free open source "professional" license, equal to their "professional" plan, which is normally $399 (onetime purchase).

Visual studio installer msi is not updating UI

Proper versioning of your DLL's and EXE's would prevent this.

File Versioning Rules

At the core of any installer is the actual installation of files.
Determining whether to install a file is a complex process. At the
highest level, this determination depends on whether the component to
which a file belongs is marked for installation. Once determined that
a file should be copied, the process is complicated if another file
with the same name exists in the target folder. In such situations,
making the determination requires a set of rules involving the
following properties:

•Version

•Date

•Language

Visual Studio Installer project throws no errors on build but msi/exe files are not created

sorry, my own mistake, there WAS an error in the build, it was neglected by the 'Error List' tab of the logger for some reason, which is strange,

now its just a missing file and I can work with that.

VS2017 Installer project output does not replace the current installation

The way you do the upgrade is to use the RemovePreviousVersions project setting. The steps are:

  1. Increment the setup project's version and accept the changes, this will include a change of ProductCode.
  2. Make sure that RemovePreviousVersions is set true.
  3. The UpgradeCode (setup project properties) needs to be the same so don't change it.
  4. Increment the file versions of the binaries that need updating (that's the standard rule about updating versioned binaries).

The resulting MSI will do a major upgrade (in Windows Installer terminology) and upgrade the older version, replacing it with your new product MSI. Note that an upgrade will work only with the same context of install. An Everyone will not upgrade a Just me, so that will result in two entries in Programs and Features. Doing the install creating a verbose log and searching foe FindRelatedProducts entries will tell you if it found the upgrade or not. msiexec /I [path to msi file] /l*vx [path to a text log file]

There's a longer explanation here:
https://www.red-gate.com/simple-talk/dotnet/visual-studio/updates-to-setup-projects/?_ga=2.138201520.1662048302.1514485579-1682631157.1514485579

which is old but relevant. and doesn't mention the requirement to update binary file versions (it wasn't needed with early VS setup projects).

MSI Installer: Conditionally include one or another file for 32 or 64-bit systems

For this you can use the VersionNT64 property to conditionally install files based on the OS bitnesss.

The installer sets the VersionNT64 property to the version number for the operating system only if the system is running on a 64-bit computer. The property is undefined if the operating system is not 64-bit.

Check the VersionNT64 property article.



Related Topics



Leave a reply



Submit