Forum Discussion
Use custom appinstaller file in Visual Studio packaging process
Hi! Still new to MSIX and trying to figure out the workflows. I have a WPF Bridge app and a Windows Application Packaging project in Visual Studio. I have successfully used Visual Studio's Publish -> Create App Package wizard. Now I'd like to add the option to the appinstaller file to show a prompt when there's an update ( <UpdateSettings><OnLaunch ShowPrompt="true" ... ). Is there a way to have that option included in the packaging process through Visual Studio? The only alternative that I can see is to manually edit the generated appinstaller file in AppPackages every time I publish, which I'd prefer not to have to do.
Thanks!
If you're using:
Visual Studio 2019
You can add the .appinstaller file to your App Packaging Project and modify the update settings from there.
When you eventually go through the packaging wizard, the update settings you defined in the file are preserved.
Have a look at this post for more details - https://techcommunity.microsoft.com/t5/Windows-Dev-AppConsult/Introducing-the-new-App-Installer-template-in-Visual-Studio-2019/ba-p/739019
Visual Studio 2017
The AppInstaller File Builder Sharla recommends is a great option to use for generating the .appinstaller file with your preferred update settings.
Hope this helps.
Tanaka
- Tanaka_JimhaMicrosoft
If you're using:
Visual Studio 2019
You can add the .appinstaller file to your App Packaging Project and modify the update settings from there.
When you eventually go through the packaging wizard, the update settings you defined in the file are preserved.
Have a look at this post for more details - https://techcommunity.microsoft.com/t5/Windows-Dev-AppConsult/Introducing-the-new-App-Installer-template-in-Visual-Studio-2019/ba-p/739019
Visual Studio 2017
The AppInstaller File Builder Sharla recommends is a great option to use for generating the .appinstaller file with your preferred update settings.
Hope this helps.
Tanaka
- twastvedtCopper ContributorPerfect! This is exactly what I was looking for. Thanks!
- ShakersMSFTMicrosoft
twastvedt As an alternative to manually editing, you can also build an app installer file using the App Installer File Builder, which is available through the MSIX Toolkit. This provides a handy UI that allows you to customize your app installer file without needing to edit the xml manually. You can find it here on our GitHub.
- KevinLa_msMicrosoft
Thanks for the report. It does appear that the tooling does not:
1) provide a UI in the wizard for creating that entry
2) nor preserve your modifcations
I will open a bug on Visual Studio to address this.
Thanks!
- twastvedtCopper ContributorI just applied Tanaka_Jimha's solution, below, and it does preserve modifications, so your #2 is not an issue. It's not in the UI, but it works for me!