Question about MSIX features

Copper Contributor

We're going to use MSIX to deploy a fairly complex solution that consists of an UWP application, Windows Service or UWP Background Task, and SQL Server Express instance. Could you please answer some of the following questions:

 

  • We should start background work right after installation, but UWP app must be launched at least once to register Background Task. Does MSIX provide any option to activate UWP app right after the installation?
  • If it doesn't, we will have to use Windows Service and it is really great that MSIX team added support for Windows Services in the new versions of this tool. But does it support auto updates for Windows Services, or this feature works for UWP only?
  • Since we need to have that app working with local instance of SQL Express, we must add network loopback rule to grant UWP app access to SQL Server. Is it possible to execute "checknetisolation loopbackexempt" command as part of app deployment process?
  • Can we use MSIX to deploy and update SQL Express databases too? I guess we should execute SqlPackage.exe for DACPAC deployment or sqlcmd.exe to run SQL scripts, but is it possible to run such commands during installation process?
  • Can one MSIX package contain multiple artifacts? It would be nice to have one MSIX package for UWP app, Windows Service and SQL database. Probably, this is already too much for one package, but wouldn't it be possible to run silent installation of SQL Express from the same package too?
1 Reply

@omikhailov 

 

  • We should start background work right after installation, but UWP app must be launched at least once to register Background Task. Does MSIX provide any option to activate UWP app right after the installation?

Not really. PreinstalledConfigTask and UpdateTask do just this but PreinstalledConfigTask is restricted to preinstalled packages.

  • If it doesn't, we will have to use Windows Service and it is really great that MSIX team added support for Windows Services in the new versions of this tool. But does it support auto updates for Windows Services, or this feature works for UWP only?

Can you please clarify what auto-update means here? It can be updated but the expectations are not clear.

  • Since we need to have that app working with local instance of SQL Express, we must add network loopback rule to grant UWP app access to SQL Server. Is it possible to execute "checknetisolation loopbackexempt" command as part of app deployment process?

Not Really. CustomActions are the only option for this but it is highly discouraged.

  • Can we use MSIX to deploy and update SQL Express databases too? I guess we should execute SqlPackage.exe for DACPAC deployment or sqlcmd.exe to run SQL scripts, but is it possible to run such commands during installation process?

Generally scripts running during deployment are not supported.

  • Can one MSIX package contain multiple artifacts? It would be nice to have one MSIX package for UWP app, Windows Service and SQL database. Probably, this is already too much for one package, but wouldn't it be possible to run silent installation of SQL Express from the same package too?

Possibly. Though coupling a service to a UWP will cause an unnecessary friction in the servicing pipeline. i.e. UWP cannot update because the service fails to shutdown or vice versa.