03-04-2020 07:17 AM
03-04-2020 07:17 AM
I have read in some threads that MSIX will start to support also windows services from the January build. But I only seem to find information of how to migrate an existing installer containing a service to MSIX. How should I do if I want to create a completely new MSIX bundle from scratch, containing a UWP project and a Windows Service?
I have a sollution in visual studio containing a UWP project and a Windows Service Project. I try to simply add those two projects to a new windows application packaging project but no matter how I do this I only manage to install the UWP app from the created bundle. Is it still not possible to include the Service project in my MSIX? I can´t find no documentation of how this could be done.
I also found this thread suggesting to use background tasks instead of a Service:
Is this still the recommendation? I am afraid that the background task may be a bit too limitied for my intentions. My main requirement for a service is not to have something running in the background, but to access functions outside the UWP sandbox. Like USB storage and other functionality. But maybe this can be achieved by a background task as well?
So my question is if I should go for the MSIX sollution or if I need to relay on some other packaging sollution for my projects.
03-05-2020 06:34 AM - edited 03-05-2020 06:34 AM
Just linking to the same question on StackOverflow
03-05-2020 04:31 PM - edited 03-05-2020 04:37 PMSolution
Our recommendation for apps in development is to use background tasks instead of trying to add a Windows Service.
For the case where you're trying to access content outside the UWP container, you can consider adding a desktop extension component to your UWP package and then using that for your required functionality. Have a look at this blog post for more details - https://stefanwick.com/2018/04/06/uwp-with-desktop-extension-part-1/