Visual Studio 2012 と にTarget Windows Phone OS Version
設定された WP8 SDK を使用して Windows Phone アプリケーションを作成していWindows Phone OS 7.1
ます。モードはデバッグで、テスト用に SDK 出荷の「エミュレータ 7.8」を使用しています (「エミュレータ 7.1」と WP8 エミュレータ、または WP7.8 デバイスでも同じ結果です)。
私のコードは次のとおりです。
#if DEBUG
public void Test()
{
if (ScheduledActionService.Find(ReminderName) != null) {
try {
ScheduledActionService.LaunchForTest(ReminderName,
TimeSpan.FromSeconds(1));
} catch (NotSupportedException e) {
System.Diagnostics.Debug.WriteLine(e.Message);
System.Diagnostics.Debug.WriteLine(e.ToString());
}
} else {
MessageBox.Show("No scheduled notification has been installed");
}
}
#endif
ボタンを介してこのメソッドを呼び出すと、次のデバッグ出力が得られます。
A first chance exception of type 'System.NotSupportedException' occurred in
Microsoft.Phone.dll LaunchForTest is not supported
System.NotSupportedException: LaunchForTest is not supported
at Microsoft.Phone.Scheduler.ScheduledActionService.LaunchForTest(String name, TimeSpan delay)
at RingReminder.Control.RingAgent.Test()
ScheduledActionService.LaunchForTestメソッドが次
のように述べているため、ここで途方に暮れていますWindows Phone OS | Supported in: 8.0, 7.1
。
SO または Google でこの問題を検索しても、何も表示されませんでした。
ご協力いただきありがとうございます