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:
- Increment the setup project's version and accept the changes, this will include a change of ProductCode.
- Make sure that RemovePreviousVersions is set true.
- The UpgradeCode (setup project properties) needs to be the same so don't change it.
- 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
Entity Framework Filter "Expression<Func<T, Bool>>"
How to Read/Stream a File Without Loading the Entire File into Memory
How to Convert JSON Array to List of Objects in C#
Passing Array of Strings to Webmethod with Variable Number of Arguments Using Jquery Ajax
Pass a Value from One Form to Another
Incorrectly Aligned or Overlapped by a Non-Object Field Error
Install to Same Path When Upgrading Application
How to Group by on 2 Child Entities and Get Total of Both This Child Entities
When Would You Use Delegates in C#
Apply Function to All Elements of Collection Through Linq
Do the New C# 5.0 'Async' and 'Await' Keywords Use Multiple Cores
Best Hashing Algorithm in Terms of Hash Collisions and Performance for Strings
Copying Files into the Application Folder at Compile Time
How to Get Some Values from a JSON String in C#
Iterating Over JSON Object in C#
Bring Another Processes Window to Foreground When It Has Showintaskbar = False