This project is read-only.


Using LittleWatson in Background Agent


It would be nice to be able to use LittleWatson to handle exceptions in background agents (e.g. period agents). If you attempt to use the library however, Marketplace validation will fail due to reliance on Microsoft.Phone.Shell.PhoneApplicationService
Is there any suggested workaround?

file attachments

Closed Dec 1, 2012 at 4:41 AM by southernsun


southernsun wrote Jan 13, 2012 at 2:13 AM

This should be caused by the following line:

exc.AppVersion = VersionManagement.GetVersion().ToString();

This uses the PhoneApplicationService.State property to retrieve the version number. I will make an update so you can manually assign a version number when running from a background agent.

southernsun wrote Jan 13, 2012 at 2:23 AM

You can now call SaveExceptionForReporting with a version number, so it wont use PhoneApplicationService.State for retrieving the version number. This means you will need to update this manually everytime you publish a new release of your application. I didn't remove the reporting of the version number because I think it's critical to have for debugging purposes.

LittleWatson.SaveExceptionForReporting(e.ExceptionObject as Exception, "");

wrote Jan 13, 2012 at 2:24 AM

wrote Feb 4, 2012 at 7:23 AM

nanabite wrote Feb 4, 2012 at 7:23 AM

Hi southernsun,

Thanks for looking into this, however the app will still fail certification if the assembly is included. Screenshot attached.


southernsun wrote Feb 7, 2012 at 7:15 PM

Fixed in v0.1.2.

** Closed by southernsun 1/12/2012 6:24 PM

southernsun wrote Feb 7, 2012 at 7:15 PM

Validation would still fail when LittleWatson is used as BackgroundTask.

southernsun wrote Feb 7, 2012 at 7:17 PM

This is fixed with the latest release v1.1.1. Make sure you only use the NorthernLights.Core, NorthernLights.LittleWatson and NorthernLights.PersistentVariables dlls in your background task project. Remove NorthernLights.StateVariables and NorthernLights.Controls.

wrote Dec 1, 2012 at 4:41 AM

Resolved with changeset 15748.

wrote Feb 13, 2013 at 10:48 PM

wrote May 16, 2013 at 1:17 AM

wrote Dec 9, 2017 at 6:20 AM