Reputation: 25
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!
Upvotes: 2
Views: 318
Reputation: 2585
I think this is down to the value of the xmlns
attribute on the <AppInstaller>
element in the .appinstaller
file.
In my experience, if it is set to
http://schemas.microsoft.com/appx/appinstaller/2017/2
The presence of a ShowPrompt
attribute in the <OnLaunch>
element will cause an 'Invalid appinstaller file' type error.
But if you update it to
http://schemas.microsoft.com/appx/appinstaller/2018
the ShowPrompt
attribute will be accepted, and the file will parse correctly.
Upvotes: 0