Error in Review Submission (ScheduledTaskAgent) RRS feed

  • Question

  • Hi,

    I am developing Windows Phone 8 application (C#, XAML). It is an application with a ScheduledTaskAgent.

    When uploading the XAP file to the store I am getting this error:

    2012: Agent myAppScheduledTaskAgent doesn’t have a valid entry assembly.

    the WMAppManifest.xml is the following:

    <?xml version="1.0" encoding="utf-8"?>
    <Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0">
      <DefaultLanguage xmlns="" code="en-US" />
      <App xmlns="" ProductID="{131a9dc4-85a8-4b60-9647-962772634493}" Title="myApp" RuntimeType="Silverlight" Version="" Genre="apps.normal" Author="Eitan Barazani" Description="The myApp application will track you App.&#xA;" Publisher="YASIG Engineering" PublisherID="{4904fd05-1902-4f0b-ae9f-f66ad77f49bf}">
        <IconPath IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</IconPath>
          <Capability Name="ID_CAP_NETWORKING" />
          <Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
          <DefaultTask Name="_default" NavigationPage="Views/ReadDataPage.xaml" />
          <ExtendedTask Name="BackgroundTask">
            <BackgroundServiceAgent Specifier="ScheduledTaskAgent" Name="myAppScheduledTaskAgent" Source="myAppScheduledTaskAgent" Type="myAppScheduledTaskAgent.ScheduledAgent" />
          <PrimaryToken TokenID="myAppToken" TaskName="_default">
              <SmallImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileSmall.png</SmallImageURI>
              <BackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileMedium.png</BackgroundImageURI>
              <BackBackgroundImageURI IsRelative="true" IsResource="false">
              <LargeBackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileLarge.png</LargeBackgroundImageURI>
              <LargeBackContent />
              <LargeBackBackgroundImageURI IsRelative="true" IsResource="false">
              <DeviceLockImageURI IsRelative="true" IsResource="false">
          <ScreenResolution Name="ID_RESOLUTION_WVGA" />
          <ScreenResolution Name="ID_RESOLUTION_WXGA" />
          <ScreenResolution Name="ID_RESOLUTION_HD720P" />

    My ScheduledAgent.cs file is the following:

    namespace myAppScheduledTaskAgent { public class ScheduledAgent : ScheduledTaskAgent { /// <remarks> /// ScheduledAgent constructor, initializes the UnhandledException handler /// </remarks> static ScheduledAgent() { // Subscribe to the managed exception handler Deployment.Current.Dispatcher.BeginInvoke( delegate { Application.Current.UnhandledException += UnhandledException; } ); } /// Code to execute on Unhandled Exceptions private static void UnhandledException( object sender, ApplicationUnhandledExceptionEventArgs e ) { if ( Debugger.IsAttached ) { // An unhandled exception has occurred; break into the debugger Debugger.Break(); } } /// <summary> /// Agent that runs a scheduled task /// </summary> /// <param name="task"> /// The invoked task /// </param> /// <remarks> /// This method is called when a periodic or resource intensive task is invoked /// </remarks> protected override async void OnInvoke( ScheduledTask task ) { tileCount = 2;
    UpdateMainFlipTile( tileCount ); #if DEBUG_AGENT // If debugging is enabled, launch the agent again in one minute. ScheduledActionService.LaunchForTest( task.Name, TimeSpan.FromSeconds( 60 ) ); #endif // Call NotifyComplete to let the system know the agent is done working. NotifyComplete(); } .


    When uploading the XAP I am getting the above error.
    When loading the application to the debugger and on my Device the application works fine.

    I tried to remove the ExtendedTask definition from the manifest:

          <ExtendedTask Name="BackgroundTask">
            <BackgroundServiceAgent Specifier="ScheduledTaskAgent" Name="myAppScheduledTaskAgent" Source="myAppScheduledTaskAgent" Type="myAppScheduledTaskAgent.ScheduledAgent" />

    The uploading the XAP file completes without an error, but there the scheduled task agent doesn't work either.    :(

    Any idea what am I doing wrong here?


    Tuesday, August 20, 2013 5:58 AM


All replies