5

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.

RELEASES File

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(); 
colinwurtz
  • 703
  • 1
  • 7
  • 23
  • Did you ever find a way to reset it so your installs would update to the current version? – ctc Aug 02 '17 at 19:58
  • Nope... pretty frustrating. Even posted a question/comment on the Github repo several months back and no response. https://github.com/Squirrel/Squirrel.Windows/issues/981 – colinwurtz Aug 03 '17 at 14:27

0 Answers0