title: Pre-Installed Configuration Task for UWP App not runing
body: <p>for a LOB App written as a Windows Universal App, <strong>I want to register a Background Task when the app is installed without the need to start it</strong>. From what I can see, the documentation points me to the <em>Pre-Installed Configuration</em> capability in the Package.appxmanifest and I found <a href="https://stackoverflow.com/questions/40931552/register-a-background-task-without-running-the-app/40935478#40935478">this</a>. </p>
  
  <p>However, when using this extension, the background task is not registered nor can I see that it runs anything.</p>
  
  <p><strong>Here is my Pre-Installed Configuration extension in Package.appxmanifest:</strong></p>
  
  <pre><code>&lt;Extension Category="windows.preInstalledConfigTask" EntryPoint="Foo.BackgroundTasks.DefaultRegistrationBackgroundTask" /&gt;
  </code></pre>
  
  <p>To validate that the Task and Entrypoint is set correctly, I registered it using the <em>Update Task</em> capability, increased the App version, deployed it again and the background task is registered and everything works as expected.</p>
  
  <p><strong>Here is my Update Task extension in Package.appxmanifest:</strong></p>
  
  <pre><code> &lt;Extension Category="windows.updateTask" EntryPoint="Foo.BackgroundTasks.DefaultRegistrationBackgroundTask" /&gt;
  </code></pre>
  
  <p>Is the <em>Pre-Installed Configuration Task</em> somehow limited or needs other configuration? How can I debug this sort of issue? No Breakpoints are hit.</p>
  
  <p><strong>Code of Foo.BackgroundTasks.DefaultRegistrationBackgroundTask:</strong> </p>
  
  <pre><code>public sealed class DefaultRegistrationBackgroundTask : IBackgroundTask
  {
      private BackgroundTaskDeferral _backgroundTaskDeferral;
      public void Run(IBackgroundTaskInstance taskInstance)
      {
  
          // Deferral is required if code uses any async call
          _backgroundTaskDeferral = taskInstance.GetDeferral();
  
          // Location Services
          BackgroundTaskHelper.RegisterBackgroundTask("Foo.BackgroundTasks.LocationBackgroundTask",
              "Foo.LocationBackgroundTask",
              new SystemTrigger(SystemTriggerType.UserPresent, false),
              null);
  
          // Referal releases
          _backgroundTaskDeferral.Complete();
      }  
  }
  </code></pre>