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.
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.
2
Answers
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,
Configuring automatic/self-updates for a MAUI Blazor Hybrid Desktop Application can be a bit tricky
AppInstaller File: You are correct that the .appinstaller file is essential for automatic updates. Visual Studio should generate this file for you when you publish the application, but it’s worth checking if it exists. Look in the output folder for your application’s published files. You should see a file named .appinstaller. If it’s not there, you may need to manually create it or recheck your publish settings.
Publish Settings: In your project settings, go to the "Publish" tab.
Under "Installer Location," you can specify your S3 bucket URL like you did.
Ensure that you’ve set up the correct update settings in the publish profile, including checking the "Create a .appinstaller file" option.
File Structure in S3 Bucket: Make sure that the structure of your files in the S3 bucket matches the expected format. It should be something like this:
Application Installation Folder: When you install the application, it’s usually installed in the default system location. However, it’s the .appinstaller file’s job to handle updates. When you launch your application, it should automatically check for updates based on the URL in the .appinstaller file.
Testing Updates:
Troubleshooting: