Modifying my MSIX app installer file for custom update settings

48 Views Asked by At

I am working on a WPF application and looking to move from ClickOnce to MSIX sideloading in order to publish my application on a file share within my company. One issue I have is with the updating process of MSIX apps. Currently the update to my app is only visible the second time the app is opened, as the first time the update is downloaded in the background. In ClickOnce i have startup scripts that handle this behaviour but in MSIX i want a cleaner method.

I have seen that the app installer can contain Update Settings where I can potentially set some of the properties to get my desired behaviour. The default looks like:

<UpdateSettings>
        <OnLaunch
            HoursBetweenUpdateChecks="0"
</UpdateSettings>

and i want it to become:

    <UpdateSettings>
        <OnLaunch
            HoursBetweenUpdateChecks="0"
            ShowPrompt="true"
            UpdateBlocksActivation="true"/>
        <ForceUpdateFromAnyVersion>true</ForceUpdateFromAnyVersion>
    </UpdateSettings>

If i try modify the app installer file manually, i can no longer open it as it gives a parsing error. How can i make this work? Is there a setting in Visual Studio that would allow this? I am using the Windows Application Packaging Project template in order to create my MSIX package.

If there is another way around this issue I would be glad to hear it too. Thank you!

0

There are 0 best solutions below