Description
When an application is installed via the Velopack-generated MSI installer, the packages/ directory inside the install folder is never created or seeded with the current version's {packId}-{version}-full.nupkg. This prevents delta updates from working for the first update after MSI installation, because Velopack has no local base package to apply the delta patch against.
This is inconsistent with the documentation, which states:
"After installation, updates work identically via Update.exe regardless of whether the app was installed with Setup.exe or the .msi."
In practice, delta updates only work identically from the second update onward when using MSI.
Steps to Reproduce
- Build a release with
vpk pack --msi (e.g. version 2.0.0).
- Install the application using the generated
.msi file.
- Inspect the install directory — the
packages/ subfolder is absent (or empty).
- Build and deploy a new release (e.g. version
2.0.1) including a delta package.
- Launch the installed application and trigger an update check.
- Observe that Velopack downloads the full
2.0.1-full.nupkg instead of the smaller 2.0.1-delta.nupkg.
- After the update completes, inspect the
packages/ folder — it now contains {packId}-2.0.1-full.nupkg.
- Deploy version
2.0.2 and trigger another update — delta now works correctly, because the 2.0.1 base package is present.
Expected Behavior
The MSI installer should seed the packages/ folder with the current version's full.nupkg during installation (the same way Setup.exe does), so that delta updates work correctly starting from the very first update.
Actual Behavior
- After MSI installation, the
packages/ directory does not exist or is empty.
- The first update is always a full download, regardless of whether a delta package is available on the server.
- Subsequent updates work correctly (delta is applied using the previously stored full package).
Environment
- OS: Windows 11
- App framework: .NET 10 MAUI Desktop Win
- Velopack version: 1.2.0
- MSI install location: PerUser (
%LocalAppData%\{packId})
Root Cause Analysis
When Setup.exe installs the application, it:
- Extracts the embedded nupkg.
- Deploys app files to
current/.
- Stores
{packId}-{version}-full.nupkg in the packages/ folder as a reference for future delta reconstruction.
When the MSI installs the application, it:
- Deploys app files to
{installDir}/current/ via Windows Installer.
- Deploys
Update.exe.
- Does not create or populate the
packages/ folder — the nupkg is not part of the WiX-generated file layout.
As a result, Update.exe cannot find a local base package and falls back to downloading the full release.
Suggested Fix
The MSI build process (WiX 5 generation) should include the current version's full.nupkg as an installed file in {installDir}\packages\{packId}-{version}-full.nupkg, mirroring what Setup.exe does at install time.
Alternatively, Update.exe could be invoked as a custom action at the end of the MSI installation to perform the same post-install bootstrap that Setup.exe currently performs.
Workaround
As a temporary workaround, the application can detect first run (empty/missing packages/ folder) and silently download the current version's full.nupkg from the update server in the background using WithFirstRun(...) hook:
VelopackApp.Build()
.WithFirstRun(version =>
{
_ = Task.Run(() => BootstrapPackagesCacheAsync(version));
})
.Run();
This is not ideal as it downloads the full package (potentially large) silently on first launch.
Description
When an application is installed via the Velopack-generated MSI installer, the
packages/directory inside the install folder is never created or seeded with the current version's{packId}-{version}-full.nupkg. This prevents delta updates from working for the first update after MSI installation, because Velopack has no local base package to apply the delta patch against.This is inconsistent with the documentation, which states:
In practice, delta updates only work identically from the second update onward when using MSI.
Steps to Reproduce
vpk pack --msi(e.g. version2.0.0)..msifile.packages/subfolder is absent (or empty).2.0.1) including a delta package.2.0.1-full.nupkginstead of the smaller2.0.1-delta.nupkg.packages/folder — it now contains{packId}-2.0.1-full.nupkg.2.0.2and trigger another update — delta now works correctly, because the2.0.1base package is present.Expected Behavior
The MSI installer should seed the
packages/folder with the current version'sfull.nupkgduring installation (the same waySetup.exedoes), so that delta updates work correctly starting from the very first update.Actual Behavior
packages/directory does not exist or is empty.Environment
%LocalAppData%\{packId})Root Cause Analysis
When
Setup.exeinstalls the application, it:current/.{packId}-{version}-full.nupkgin thepackages/folder as a reference for future delta reconstruction.When the MSI installs the application, it:
{installDir}/current/via Windows Installer.Update.exe.packages/folder — the nupkg is not part of the WiX-generated file layout.As a result,
Update.execannot find a local base package and falls back to downloading the full release.Suggested Fix
The MSI build process (WiX 5 generation) should include the current version's
full.nupkgas an installed file in{installDir}\packages\{packId}-{version}-full.nupkg, mirroring whatSetup.exedoes at install time.Alternatively,
Update.execould be invoked as a custom action at the end of the MSI installation to perform the same post-install bootstrap thatSetup.execurrently performs.Workaround
As a temporary workaround, the application can detect first run (empty/missing
packages/folder) and silently download the current version'sfull.nupkgfrom the update server in the background usingWithFirstRun(...)hook:This is not ideal as it downloads the full package (potentially large) silently on first launch.