I've been using Squirrel.Windows to deploy a WPF successfully for some time now. I had my machine re-imaged and the RELEAESES
file inside the Releases
folder was recreated from scratch since I was excluding this folder entirely in my .gitignore
. This seems to have broken the auto update functionality for users on a version that was created before I re-imaged.
Is there anything I can set in the RELEASES
file to force the older versions to pull in the updated ones without recreating all the nuget packages?
Here's the relevant portion of my RELEASES
file. Users on the version 2.0.6121.16815
are not being automatically migrated to the newer versions at the bottom.
Here's my updater code from app.xaml.cs
. Not sure it's relevant since it's technically running fine.
Task.Run(async () =>
{
using (var mgr = new UpdateManager(updatePath, packageName))
{
var updates = await mgr.CheckForUpdate();
if (updates.ReleasesToApply.Any())
{
try
{
var lastVersion = updates.ReleasesToApply.OrderBy(x => x.Version).Last();
await mgr.DownloadReleases(updates.ReleasesToApply);
await mgr.ApplyReleases(updates);
try
{
latestExe = Path.Combine(mgr.RootAppDirectory, string.Concat("app-", lastVersion.Version), "App.exe");
log.Debug("Latest exe:" + latestExe);
mgr.CreateShortcutsForExecutable(latestExe, DefaultLocations, false);
}
catch(Exception ex)
{
log.Error("error creating shortcuts for executable",ex);
}
restart = true;
}
catch(Exception ex)
{
log.Error("Error pulling in updated files", ex);
}
}
else
{
//No updates
log.Debug("No updates available");
}
}
if (restart)
{
log.Debug("Updated App. Restarting...");
UpdateManager.RestartApp(latestExe);
}
}).Wait();