I'm using Launch UWP App Via CommandLine online tutorial to execute my UWP
app named UWPTest
via PowerShell
on Windows 10 -latest version update 1903
. The app opens successfully but only shows the splash screen. Moreover, the splash screen just stays there forever unless I close it using X
button on top right corner. Question: What could be the cause and how can we resolve it?
Note:
- The splash screen does not hang it just stays there and I can move it around, maximize, minimize, etc.
- When I ran the app from start menu it works as expected and shows the following Main Page.
- Ref: uap5:AppExecutionAlias
Snapshot of Splash Screen [that just stays there when running the app via command line]:
Snapshot of Main Window of the app [that appears normally if run the app from VS2019
or from the windows Start Menu. But this window does now appear when running the app via command line]:
My appxmanifest File of UWPTest app:
<?xml version="1.0" encoding="utf-8"?>
<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">
<Identity
Name="86754353-ac66-48f5-b6bb-fdad292dd398"
Publisher="CN=myDesktopUserName"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="86754353-ac66-48f5-b6bb-fdad292dd398" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>UWPTest</DisplayName>
<PublisherDisplayName>myDesktopUserName</PublisherDisplayName>
<Logo>AssetsStoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="UWPTest.App">
<uap:VisualElements
DisplayName="UWPTest"
Square150x150Logo="AssetsSquare150x150Logo.png"
Square44x44Logo="AssetsSquare44x44Logo.png"
Description="UWPTest"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="AssetsWide310x150Logo.png" ShortName="MyTestApp" Square71x71Logo="AssetsSmallTile.png" Square310x310Logo="AssetsLargeTile.png">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo"/>
<uap:ShowOn Tile="wide310x150Logo"/>
</uap:ShowNameOnTiles>
</uap:DefaultTile >
<uap:SplashScreen Image="AssetsSplashScreen.png" />
</uap:VisualElements>
<Extensions>
<uap5:Extension Category="windows.appExecutionAlias" Executable="UWPTest.exe" EntryPoint="UWPTest.App">
<uap5:AppExecutionAlias>
<uap5:ExecutionAlias Alias="UWPTest.exe"/>
</uap5:AppExecutionAlias>
</uap5:Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
UPDATE:
- A copy of the project is here if you want to test it on your own. It's a very basic
Hello World
type project - nothing fancy. If you like, you can make any changes to make it work and then let me your suggestion. - to clarify further: The app runs successfully when launching from start menu or from
VS2019
. But, as suggested here, when I addOnActivated(…)
method inApp.xaml.cs
to make it run from command line, it shows onlySplash Screen
.