How to start a background service using Package.appxmanifest?
can someone please help me to add a Background Service to my Avalonia UI app that's delivered through an appx?
I have two projects in my solution:
What am I doing wrong? Are there other ways to do this without using MSIX? Maybe directly from Program.cs?
I tried different values for the EntryPoint attribute:
I have two projects in my solution:
- MyApp.UI - Avalonia UI project
- MyApp.UI.Installer - Application Packaging Project for creating an APPX installer
- First, in MyApp.UI, I created a file called PushNotificationBackgroundService.cs:
- Then, in MyApp.UI.Installer, I added a reference to MyApp.UI.
- After that, in MyApp.UI.Installer, I edited the Package.appxmanifest file to add an Extension for the existing application:
What am I doing wrong? Are there other ways to do this without using MSIX? Maybe directly from Program.cs?
I tried different values for the EntryPoint attribute:
- EntryPoint="$targetentrypoint$.PushNotificationBackgroundService"
- EntryPoint="MyApp.UI.PushNotificationBackgroundService"
- EntryPoint="PushNotificationBackgroundService"