简体   繁体   English

WMAppManifest.xml后台代理错误

[英]WMAppManifest.xml Background Agent error

I am getting a warning for WMAppManifest.xml file after i added a background agent task. 在添加后台代理任务后,我收到WMAppManifest.xml文件的警告。 My xml is: 我的xml是:

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

Background Agent Class file name - ScheduledTaskAgent 后台代理类文件名 - ScheduledTaskAgent

Background Agent Assembly name - myAgent 后台代理程序集名称 - myAgent

Background Agent Default namespace - myAgent 后台代理默认命名空间 - myAgent

Can anyone point out the error? 有谁可以指出错误? Thanks in advance. 提前致谢。

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. 在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. 然后右键单击主项目,单击Add Reference,转到第二个选项卡'Projects'并选择后台代理。

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. 自动创建WMAppManifest.xml中的条目。

this will probably sound strange but try to change name of background agent class to something else, eg ScheduledAgent. 这可能听起来很奇怪但是尝试将后台代理类的名称更改为其他内容,例如ScheduledAgent。 I think you might have name conflict there. 我想你可能会有名字冲突。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM