question

Hennry-7886 avatar image
0 Votes"
Hennry-7886 asked ·

Create windows services in UWP

I know how to creat windows services in Net, but how to do it using UWP, I want the service can run it automatically and we can stop it if we want.
Thanks.

windows-uwp
· 2
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Why do you want to create windows service in UWP? Can you show more details about your expected behavior?

0 Votes 0 ·

Hi, does the following answer make sense? Do you have other questions?

0 Votes 0 ·

1 Answer

jadailey-MSFT avatar image
0 Votes"
jadailey-MSFT answered ·

You cannot create a traditional Windows Service using the UWP platform. However, you can create a an App Service that uses a Background Task. You can communicate between an app and your UWP App Service using a defined API surface much like a web service. I've included links below with more information.

Create and consume an app service
https://docs.microsoft.com/en-us/windows/uwp/launch-resume/how-to-create-and-consume-an-app-service


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.