When i trying to register a background task in windows phone 8.1 insted of this sample http://code.msdn.microsoft.com/windowsapps/Tile-Update-every-minute-68dbbbff i got this error :
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
i use this code :
Dim taskBuilder As New BackgroundTaskBuilder()
taskBuilder.Name = taskName
taskBuilder.TaskEntryPoint = taskEntryPoint
taskBuilder.SetTrigger(New SystemTrigger(SystemTriggerType.UserPresent, False))
taskBuilder.Register()
Any help please ?
Make sure your taskEntryPoint
variable value matches the Entry point: value you have defined in Package.appmanifest >>> Declarations >>> Background Tasks >>> Entry point.
I found the answer (for me). I didn't pay attention to capitalization in my declaration in the Package.appmanifest. In there I set the entry point as Projectname.ClassName and when I was SetTrigger in code, I set it as ProjectName.ClassName.
My what a difference a letter makes!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With