Feb 12 2021 04:25 PM
Feb 12 2021 04:25 PM
I have an MSIX package containing several apps, one of which is intended to run whenever the PC is awake because it manages TV show recordings and schedules. That app is set to launch on startups, but it is shut down (sometimes with an error from the Store) whenever the package is updated and then its replacement is left not running until it gets relaunched by a reboot or a launch of the primary app in the package.
It seems to me that adding an Extension to that app in Category windows.updateTask should relaunch it upon updates. Virtual Studio's own AppxManifest.xml contains just such an extension for a UWP app, but adding one to my MSIX package modeled on the UWP manifest does not work. It passes certification into the Store, but then halts in downloading and won't install.
Does anyone know how to accomplish the relaunch on update of a FullTrustApplication?
Feb 16 2021 02:29 PM - edited Feb 16 2021 02:31 PM
I have further found that I cannot get a UWP app to be launched on update either. Does anyone know how to make that happen? I tried to achieve this using Visual Studio 2019, which generated the following AppxManifest Application declaration:
<Application Id="App" Executable="App3.exe" EntryPoint="App3.App"> <uap:VisualElements DisplayName="Hello World!" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="Simple UWP" BackgroundColor="transparent"> <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square71x71Logo="Assets\SmallTile.png" Square310x310Logo="Assets\LargeTile.png" /> <uap:SplashScreen Image="Assets\SplashScreen.png" /> </uap:VisualElements> <Extensions> <Extension Category="windows.updateTask" EntryPoint="App3.App" /> </Extensions> </Application>
This passed Store certification and (unlike the FullTrustApplication case with the same Extension) installed as an update without error. But the app did not launch at update!
Can this be a Store bug??
Feb 19 2021 11:28 AM
Hi @Terry_Peterson, We do have two documentation that discuss updates for apps in the Store and for apps that were deployed from outside of the store. This does require you to have access to the code for your apps in order to follow the steps in the documentation.
Feb 19 2021 11:14 PM
Hi, @Dian Hartono!
Thanks for your reply. I've looked at the links you posted and unless I'm missing the point they're addressing a different set of issues than the one I'm posing in this conversation. I am deploying my app via the Store and I'm not concerned about discovering if there is an update, but rather how to automatically relaunch a just-updated app so that the user is not left without that app's functions until it is manually relaunched sometime later. I think that is supposed to be part of what the windows.UpdateTask extension is supposed to handle, but so far I've not been able to make that work.
Feb 22 2021 01:39 PM
Hi @Terry_Peterson in the non Store documentation it provides instructions on how to automatically launch the app after update - Update non-Store published apps from your code - MSIX | Microsoft Docs
Section is called: Automatically restarting your app after an update. Can you check to see if this works for your Store apps? I am follow up internally as well.
Feb 22 2021 04:35 PM
Thanks, @Dian Hartono, for the follow up. I think that the non-Store discussion is not directly applicable to my case, but your comment on that was valuable in getting me to a discussion that I think is the one that I've been missing:
That section finally answers my question about how an app can discover that it's going to receive an update as well as how to make it restart afterward! I haven't implemented it yet, but I'm optimistic that this is the right track.