I've been trying to add an out of process background task to my project to update my App's live tile. The task needs to make a database call to get some data, then process that data to send out a few tile notifications.
I've managed to get it to work in one project that I created specifically for prototyping the background task functionality. However, when I tried to add a background task to my main project it gives me the following error:
Validation error. error 80080204: App manifest validation error: Line 33, Column 12, Reason: If it is not an audio background task, it is not allowed to have EntryPoint="BackgroundTasks.LiveTileTask" without ActivatableClassId in windows.activatableClass.inProcessServer.
I have searched for this error and found some post which said I should add the audio task type and the error would go away, but then I get a different error. I'm not even trying to play audio in the background, so it's beyond me why UWP thinks I am.
My project setup looks like this:
- 1 UWP project targeting fall creator's update as min/target version.
- 1 net standard 2.0 project for the database (with EFcore)
I've tried following the guidelines published by Microsoft, and add a WinRT project solely for the background task, but that gives compatibility issues all over the place with my .net standard 2.0 project and the UWP project. I'm not a very experienced UWP developer, so I'm wondering if anyone sees something that I'm missing.
What would be the best approach to getting my background task working? Is an in-process background task sufficient for updating the live tile from the background, even if the app is not opened?
EDIT: I'm using the latest version of VS 2017 (15.7.1)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…