SOLVED

MSIX for UWP and Windows service Bundle

Copper Contributor

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:

https://social.msdn.microsoft.com/Forums/en-US/8d9c8a03-0f56-4a22-9b42-516c047e71d9/msix-packaging?f...

 

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.

 

2 Replies
best response confirmed by ABerglund (Copper Contributor)
Solution

Hi @ABerglund 

 

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/

 

Cheers,

Tanaka

1 best response

Accepted Solutions
best response confirmed by ABerglund (Copper Contributor)
Solution

Hi @ABerglund 

 

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/

 

Cheers,

Tanaka

View solution in original post