I am trying to write a BLE wp 8.1 application which should reconnect to
a BLE device when the device is in range. The problem is that when I'm
trying to modify the connection state the application crashes.
My starting point is :
I cannot attach the debugger to see if the Run method was called in the background service,
because the application crashes.
I'm stuck in this problem, any help would be appreciated, thanks
Setting a try and catch method just after the register method for a background task shows me this :
An unhandled exception of type 'System.ExecutionEngineException' occurred in Unknown Module.
[SOLVED] Thanks to http://visualstudiomagazine.com/articles/2013/05/01/background-tasks-in-windows-store-apps.aspx
where it says clearly that :
it is extremely important to add a reference to the new project from your app, because the main app never actually calls the background task directly. A compile-time error won't be generated without a reference, but your app will crash once the trigger is fired. To add the reference to your app, right-click on the References folder under the BackgroundTaskDemo project in the Solutions Explorer and select Add Reference. In the left column, under Solution, select Projects. Check the BackgroundTasks project and select OK.