Windows phone 7 在Windows Phone 7上使用ShellTileSchedule时出现InvalidOperationException

Windows phone 7 在Windows Phone 7上使用ShellTileSchedule时出现InvalidOperationException,windows-phone-7,windows-phone,Windows Phone 7,Windows Phone,使用以下代码创建ShellTileSchedule时,我遇到了InvalidOperationException: ShellTileSchedule sch; public void UpdateTile() { sch = new ShellTileSchedule(); sch.Recurrence = UpdateRecurrence.Interval; sch.Interval = UpdateInterval.EveryHour; sch.StartT

使用以下代码创建ShellTileSchedule时,我遇到了InvalidOperationException:

ShellTileSchedule sch;
public void UpdateTile()
{
    sch = new ShellTileSchedule();
    sch.Recurrence = UpdateRecurrence.Interval;
    sch.Interval = UpdateInterval.EveryHour;
    sch.StartTime = DateTime.Now;
    sch.RemoteImageUri = new Uri(@"http://winmilk.julianapena.com/Tile3.png");

    sch.Start();
}
调用
sch.Start()时会发生异常。
无论我是使用间隔更新还是一次性更新,这种情况都会发生

有人知道为什么会这样吗


提前谢谢

Doh,找到了答案。没有添加

<Capability Name="ID_CAP_PUSH_NOTIFICATION"/> 指向WMAppManifest.xml文件


有点误导,因为ShellTileSchedule的文档中说它正在“无推送通知”地更新互动程序。至少它现在可以工作了:)

我也遇到了同样的问题,因为我的日程安排的属性不正确

如果我将计划设置为“仅更新一次”,然后设置其“间隔”,则会显示错误

如果我取消间隔,这个问题就会消失