1

Hi i started using squirrel in my app and I can update my app smoothly from the web location(where i put my setup, versions)

I want to get the release notes for the future version. I can get get the future version's version number however, i couldnt get the release notes of it.

Here's my code

using (var mgr = new UpdateManager(@"http://mysamplewebsite.com/version/"))
{
               var updateInfo = await mgr.CheckForUpdate();

                if (updateInfo.ReleasesToApply.Any())
                {
                    string futureVersion = updateInfo.FutureReleaseEntry.Version.ToString();
                   //GOOD
                    MessageBox.Show(futureVersion);

                   var futureReleaseNotesLocalDirectory = updateInfo.FutureReleaseEntry.GetReleaseNotes(@"C:\Users\source\repos\UpdateAppTesting\Releases");
                    //GOOD I can even get the release notes in my local directory
                    MessageBox.Show(futureReleaseNotesLocalDirectory);


                 //giving me an error of URI FORMATs are not supported
                  var futureReleaseNotesWEBLocation = updateInfo.FutureReleaseEntry.GetReleaseNotes(@"http://mysamplewebsite.com/version/");
                    MessageBox.Show(futureReleaseNotesWEBLocation);
                }
                else
                {
                    MessageBox.Show("No updates detected.");
                }
}

While i can get the update's release notes through the directory , I cannot get the release notes through web url location.

The web url location is working because i can get the future version's version number. But when i am trying to get the release notes, its giving me an error of URI FORMATs are not supported

Hope someone can help me, because release note is very important for the user know what is the new update/changes from the app. Thanks

Hunt Reyes
  • 11
  • 1
  • The [code](https://github.com/Squirrel/Squirrel.Windows/blob/master/src/Squirrel/ReleaseEntry.cs#L77) expects them to be local. Can you download the release notes to the local temp folder and open them from there? – stuartd Jan 07 '19 at 16:44
  • Oh thanks, yeah it expects them to be local. But do you have an idea how can i download the release notes and put in my local dir @stuartd – Hunt Reyes Jan 07 '19 at 18:20

1 Answers1

0

TL;DR

updateInfo.FutureReleaseEntry.GetReleaseNotes(updateInfo.PackageDirectory)

First you have to download the release with

mgr.DownloadReleases(updateInfo.ReleasesToApply)

Or

mgr.UpdateApp()

the nuget packages are stored in the folder packages at the App root's directory.

You can access that folder like this

updateInfo.PackageDirectory

And to get the release notes

updateInfo.FutureReleaseEntry.GetReleaseNotes(updateInfo.PackageDirectory)

But this means you have to download the entire release before you can access de release notes

Community
  • 1
  • 1
Madacol
  • 3,611
  • 34
  • 33