It seems to me that my background task is not working / starting. Is there a way to debug them or test using an integration test.
This is an example of a background task:
public sealed class MyBackgroundTask : IBackgroundTask { private ITileService _tileService;
Registering a background task: (This code is run, verified using the debugger)
var backgroundTaskBuilder = new BackgroundTaskBuilder { TaskEntryPoint = "MyNamespace.MyBackgroundTask", Name = "MyBackgroundTask" }; backgroundTaskBuilder.SetTrigger(new MaintenanceTrigger(15, false)); backgroundTaskBuilder.AddCondition(new SystemCondition(SystemConditionType.InternetAvailable)); backgroundTaskBuilder.Register();
In the application manifest, I defined a new BackgroundTask with System Event and the following entry point: MyNamespace.MyBackgroundTask
Note: The background task is in another assembly as an application (Back-end / front-end division)
Preben huybrechts
source share