当我尝试Sensors.Windows
在我的 Windows 10 机器上运行 Microsoft Band SDK (1.3.10417.1) 的示例项目时,出现以下异常:
System.ArgumentException: Value does not fall within the expected range.
at Windows.ApplicationModel.Store.CurrentApp.get_AppId()
at Microsoft.Band.StoreApplicationPlatformProvider`2.GetApplicationIdAsync(CancellationToken token)
at Microsoft.Band.BandClient.StartOrAwakeStreamingSubscriptionTasks()
at Microsoft.Band.BandClient.SensorSubscribe(SubscriptionType type)
at Microsoft.Band.Sensors.BandSensorBase`1.<>c__DisplayClass4.<StartReadingsAsync>b__3()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Band.Sensors.BandSensorBase`1.<StartReadingsAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at PunchingBand.Models.PunchingModel.<Connect>d__48.MoveNext()
看起来它正在引发异常,因为如果应用程序未在 Windows 应用商店中列出,则 SDKCurrentApp
根据此处的备注部分使用 whichCurrentAppSimulator
是不可能的。
如果 SDK 需要访问CurrentApp
我如何在开发我的应用程序时让它工作?这不像我可以在预编译的程序集中CurrentApp
交换。CurrentAppSimulator