Search code examples
windows-phonebackground-agent

WMAppManifest.xml Background Agent error


I am getting a warning for WMAppManifest.xml file after i added a background agent task. My xml is:

<ExtendedTask Name="BackgroundTask">
    <BackgroundServiceAgent Specifier="ScheduledTaskAgent" Name="MyAgent" Source="MyAgent" Type="MyAgent.ScheduledAgent" />
</ExtendedTask>

Background Agent Class file name - ScheduledTaskAgent

Background Agent Assembly name - myAgent

Background Agent Default namespace - myAgent

Can anyone point out the error? Thanks in advance.


Solution

  • I found the solution. This might help those who have been stuck at the same problem.

    Steps:

    1. Create a Background Agent using the Template in Visual Studio.
    2. In the main project, right click on solution and select add existing project
    3. Then right click on main project, click on Add Reference, go to second tab 'Projects' and select the background agent.

    The third step is the main step. I missed out on that step and hence the issue. The entry in WMAppManifest.xml will be automatically created.