If you're application uses a periodic Background Agent and you are testing it with the LaunchForTest
method you should make sure that you are not calling this in your release build of the code.
Protect it with appropriate conditional compile time checks:
#if DEBUG
ScheduledActionService.LaunchForTest(periodicTaskName, TimeSpan.FromSeconds(1));
#endif
Note that DEBUG
is defined by default in the "Debug" configuration and not in the "Release" one for situations such as this.
It would be nice if the automated tests done by the marketplace/store detected this but currently they don't. Maybe one day...