Yes, they must be in a separate assembly, and you need to reference it in WMAppManifest.xaml , for example:
<Tasks> <DefaultTask Name="_default" NavigationPage="Views/MainPage.xaml" /> <ExtendedTask Name="BackgroundTask"> <BackgroundServiceAgent Specifier="ScheduledTaskAgent" Name="DMI.ScheduledAgent" Source="DMI.TaskAgent" Type="DMI.TaskAgent.ScheduledAgent" /> </ExtendedTask>
You can read MSDN what are the correct values ββfor the BackgroundServiceAgent attributes.
If you use the Visual Studio Windows Phone Scheduled task Agent template, the BackgroundServiceAgent task is automatically added to WMAppManifest.xaml with the correct values.
Claus jΓΈrgensen
source share