title: Running UWP app from Command Line is "ONLY" showing the splash screen of the app
body: <p>I'm using <a href="https://www.c-sharpcorner.com/article/launch-uwp-app-via-commandline/" rel="nofollow noreferrer">Launch UWP App Via CommandLine</a> online tutorial to execute my <code>UWP</code> app named <code>UWPTest</code> via <code>PowerShell</code> on <code>Windows 10 -latest version update 1903</code>. The app opens successfully but only shows the splash screen. Moreover, the splash screen just stays there forever unless I close it using <code>X</code> button on top right corner. <strong>Question</strong>: What could be the cause and how can we resolve it?</p>
  
  <p><strong>Note</strong>: </p>
  
  <ol>
  <li>The splash screen does not hang it just stays there and I can move it around, maximize, minimize, etc.</li>
  <li>When I ran the app from start menu it works as expected and shows the following Main Page.</li>
  <li>Ref: <a href="https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap5-appexecutionalias" rel="nofollow noreferrer">uap5:AppExecutionAlias</a></li>
  </ol>
  
  <p><strong>Snapshot of Splash Screen</strong> [that just stays there when running the app via command line]:</p>
  
  <p><a href="https://i.stack.imgur.com/7hVDH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7hVDH.png" alt="enter image description here"></a></p>
  
  <p><strong>Snapshot of Main Window of the app</strong> [that appears normally if run the app from <code>VS2019</code> or from the windows Start Menu. But this window does now appear when running the app via command line]:</p>
  
  <p><a href="https://i.stack.imgur.com/u2VUN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u2VUN.png" alt="enter image description here"></a></p>
  
  <p><strong>My appxmanifest File of UWPTest app</strong>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;Package
    xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
    xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
    xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
    xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5"
    IgnorableNamespaces="uap mp uap5"&gt;
  
    &lt;Identity
      Name="86754353-ac66-48f5-b6bb-fdad292dd398"
      Publisher="CN=myDesktopUserName"
      Version="1.0.0.0" /&gt;
  
    &lt;mp:PhoneIdentity PhoneProductId="86754353-ac66-48f5-b6bb-fdad292dd398" PhonePublisherId="00000000-0000-0000-0000-000000000000"/&gt;
  
    &lt;Properties&gt;
      &lt;DisplayName&gt;UWPTest&lt;/DisplayName&gt;
      &lt;PublisherDisplayName&gt;myDesktopUserName&lt;/PublisherDisplayName&gt;
      &lt;Logo&gt;Assets\StoreLogo.png&lt;/Logo&gt;
    &lt;/Properties&gt;
  
    &lt;Dependencies&gt;
      &lt;TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" /&gt;
    &lt;/Dependencies&gt;
  
    &lt;Resources&gt;
      &lt;Resource Language="x-generate"/&gt;
    &lt;/Resources&gt;
  
    &lt;Applications&gt;
      &lt;Application Id="App"
        Executable="$targetnametoken$.exe"
        EntryPoint="UWPTest.App"&gt;
        &lt;uap:VisualElements
          DisplayName="UWPTest"
          Square150x150Logo="Assets\Square150x150Logo.png"
          Square44x44Logo="Assets\Square44x44Logo.png"
          Description="UWPTest"
          BackgroundColor="transparent"&gt;
          &lt;uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" ShortName="MyTestApp" Square71x71Logo="Assets\SmallTile.png" Square310x310Logo="Assets\LargeTile.png"&gt;
            &lt;uap:ShowNameOnTiles&gt;
              &lt;uap:ShowOn Tile="square150x150Logo"/&gt;
              &lt;uap:ShowOn Tile="wide310x150Logo"/&gt;
            &lt;/uap:ShowNameOnTiles&gt;
          &lt;/uap:DefaultTile &gt;
          &lt;uap:SplashScreen Image="Assets\SplashScreen.png" /&gt;
        &lt;/uap:VisualElements&gt;
        &lt;Extensions&gt;
          &lt;uap5:Extension Category="windows.appExecutionAlias" Executable="UWPTest.exe" EntryPoint="UWPTest.App"&gt;
            &lt;uap5:AppExecutionAlias&gt;
              &lt;uap5:ExecutionAlias Alias="UWPTest.exe"/&gt;
            &lt;/uap5:AppExecutionAlias&gt;
          &lt;/uap5:Extension&gt;
        &lt;/Extensions&gt;
      &lt;/Application&gt;
    &lt;/Applications&gt;
  
    &lt;Capabilities&gt;
      &lt;Capability Name="internetClient" /&gt;
    &lt;/Capabilities&gt;
  &lt;/Package&gt;
  </code></pre>
  
  <p><strong>UPDATE</strong>:</p>
  
  <ol>
  <li>A copy of the project is <a href="http://s000.tinyupload.com/?file_id=02184729165177016030" rel="nofollow noreferrer">here</a> if you want to test it on your own. It's a very basic <code>Hello World</code> type project - nothing fancy. If you like, you can make any changes to make it work and then let me your suggestion.</li>
  <li>to clarify further: The app runs successfully when launching from start menu or from <code>VS2019</code>. But, as suggested <a href="https://blogs.windows.com/windowsdeveloper/2017/07/05/command-line-activation-universal-windows-apps/#UBVMcO4PxzD2OSaV.97" rel="nofollow noreferrer">here</a>, when I add <code>OnActivated(…)</code> method in <code>App.xaml.cs</code> to make it run from command line, it shows only <code>Splash Screen</code>.</li>
  </ol>