5

I have been developing a MAUI Blazor Hybrid Desktop Application for Windows. I want to configure automatic/self-updates for that application. I have followed the publish via Visual Studio Code Instructions.

Official doc link

Followed the steps as is, for the Installer location field in the publish wizard, I entered a public s3 bucket URL which will contain the future versions of the application. The URL looks like this.

https://<bucket-name>.s3.us-east-1.amazonaws.com/blazor-application

After installing the application, I generated another version with the incremented version and posted the contents of the output folder to the s3 bucket. I closed the running application and started it again, but the auto update did not seem to work.

I found that the application needs a .appinstaller file configured with the update settings, but my understanding is that the file is automatically created by visual studio when publishing. Is that correct?

Another post suggested that the application should be installed in the root folder to receive updates, but upon installation I see no options to install on a specific location.

Any help is appreciated, please point me to the correct resources.

Viki
  • 170
  • 1
  • 10

1 Answers1

2

So, the issue is with Visual Studio I hope, the *.appinstaller file is not generated.

My issue is related to this stackoverflow question

Microsoft docs on how to create the appinstaller file manually

So, I generated the appinstaller file manually according to the steps in the above answer and it should work fine.

Additionally, I deployed this package along with the appinstaller in S3 and it works like a charm, the bucket have to be public.

Another important note is that the installation has to be done through the appinstaller file rather than the MSIX file, in order to enable auto updates.

My version of the file looked like this if anyone is wondering,

<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
    xmlns="http://schemas.microsoft.com/appx/appinstaller/2021"
    Version="1.0.0.0"
    Uri="s3 path to the appinstaller file" >
    
    <MainPackage
        Name=""
        Publisher=""
        Version="1.0.0.0"
        ProcessorArchitecture="x64"
        Uri="s3 path to the MSIX package" />
    
    <UpdateSettings>
        <OnLaunch 
            HoursBetweenUpdateChecks="0"
            ShowPrompt="true" />
        <AutomaticBackgroundTask />
    </UpdateSettings>
</AppInstaller>
Viki
  • 170
  • 1
  • 10