Application (Windows 10)

Represents an app that comprises part of or all of the functionality delivered in the package.

Element hierarchy

<Package>

    <Applications>

         <Application>

Syntax

<Application
  EntryPoint? = 'See the Attributes table for more info.'
  Executable?
  uap10:HostId?
  Id
  uap10:Parameters?
  ResourceGroup?
  uap10:RuntimeBehavior?
  StartPage?
  desktop4:Subsystem?
  uap10:Subsystem?
  desktop4:SupportsMultipleInstances?
  uap10:SupportsMultipleInstances?
  uap10:TrustLevel?
  uap16:BaseNamedObjectsIsolation?
  uap17:BaseNamedObjectsIsolation?
  desktop11:AppLifecycleBehavior?

  <!-- Child elements -->
  uap:ApplicationContentUriRules?
  Extensions?
  uap7:Properties
  uap:VisualElements

</Application>

Key

?   optional (zero or one)
&   interleave connector (may occur in any order)

Attributes and elements

Attributes

Attribute Description Data type Required Default value
EntryPoint The activatable class ID (for example, "Office.Winword.Class"), or "windows.fullTrustApplication", or "windows.partialTrustApplication". If you specify EntryPoint, then you must also specify the Executable attribute. If you specify EntryPoint, then you must not specify the StartPage attribute. A string between 1 and 256 characters in length, representing the task handling the extension. This is normally the fully namespace-qualified name of a Windows Runtime type; but it can be one of the special values "windows.fullTrustApplication" or "windows.partialTrustApplication". If EntryPoint is not specified, the EntryPoint defined for the app is used instead. No
Executable The default launch executable for the app. The specified file must be present in the package. On older systems (see the remarks section for details), if you specify Executable, then you must also specify the EntryPoint attribute. If you specify Executable, then you must not specify the StartPage attribute. A string between 1 and 256 characters in length that must end with .exe and can't contain these characters: <, >, :, ", |, ?, or *. No
uap10:HostId The app ID of the host app for the current app. This attribute is used for hosted apps. An alphanumeric string between 1 and 255 characters in length. Must begin with a letter. No
Id The unique identifier of the application within the package. This value is sometimes referred to as the package-relative app identifier (PRAID). The ID is unique within the package but not globally. There may be another package on the system that uses the same ID. The same ID cannot be used more than once in the same package. When using a Visual Studio template, the default value of this attribute is App. Developers should manually change this in the manifest. The app's identifier should not be changed after the app has been published to the Microsoft Store; doing so will disrupt the tile's position on the Start screen. An ASCII string between 1 and 64 characters in length. This string contains alpha-numeric fields separated by periods. Each field must begin with an ASCII alphabetic character. You cannot use these as field values: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Yes
uap10:Parameters Contains command line parameters to pass to the app. Only supported for desktop apps that have package identity (see Deployment overview). A string between 1 and 32767 characters in length with a non-whitespace character at its beginning and end. No
ResourceGroup A tag used to group extension activations together for resource management purposes (for example, CPU and memory). See the Remarks section in Application@ResourceGroup. An alphanumeric string between 1 and 255 characters in length. Must begin with a letter. No
uap10:RuntimeBehavior Specifies the run time behavior of the app.

"packagedClassicApp"—a WinUI 3 app, or a Desktop Bridge app (Centennial). For a WinUI 3 app, usually goes with a TrustLevel of "mediumIL" (but "appContainer" is also an option).

"win32App"—any other kind of Win32 app, including an app packaged with external location. Usually goes with a TrustLevel of "mediumIL" (but "appContainer" is also an option).

"windowsApp"—a Universal Windows Platform (UWP) app. Always goes with a TrustLevel of "appContainer".

All share common properties (some declared in appxmanifest.xml), and run as a process with package identity and application identity. You can think of them as being in two groups. One group is UWP apps ("windowsApp"); the other is Windows .exes with main or WinMain ("packagedClassicApp" or "win32App"). That second group is also known as desktop apps.
A string with one of the following values: "packagedClassicApp", "win32App", or "windowsApp". No
StartPage The web page that handles the extensibility point. A string with a value between 1 and 256 characters in length that cannot contain these characters: <, >, :, ", |, ?, or *. Any valid URI or IRI (the non-ASCII version of a URI). No
desktop4:Subsystem Indicates whether the app is a standard UWP app or a UWP console app. A string that can be any of the following values: console or windows. No
uap10:Subsystem Indicates whether the app is a standard UWP app or a UWP console app. A string that can be any of the following values: console or windows. No
desktop4:SupportsMultipleInstances Indicates support of multiple, separate instances of UWP apps. For more info, see the remarks section. A boolean value. No
uap10:SupportsMultipleInstances Indicates support of multiple, separate instances of UWP apps. For more info, see the remarks section. A boolean value. No
uap10:TrustLevel Specifies the trust level of the app

"mediumIL"—the app is full trust; its process runs with an integrity level of medium (see Mandatory Integrity Control). Needs the "Full Trust Permission Level" restricted capability (see App capability declarations).

"appContainer"—the app runs in a lightweight app container (see MSIX AppContainer apps); its process runs with an integrity level of low. It's also possible for an unpackaged app to run in an AppContainer.
A string with one of the following values: "mediumIL" or "appContainer". No
uap16:BaseNamedObjectsIsolation Enables BaseNameObject (BNO) isolation for the app. A string that can be any of the following values: package or none. No
uap17:BaseNamedObjectsIsolation Enables BaseNameObject (BNO) isolation for the app. A string that can be any of the following values: package or none. No
desktop11:AppLifecycleBehavior Allows an app to override the lifecycle behavior associated with the runtime behavior for the extension. Apps or extensions with a RuntimeBehavior of "windowsApp" implicitly have AppLifecycleBehavior of "systemManaged" unless otherwise specified. Apps or extensions with RuntimeBehavior of "packagedClassicApp" or "win32App" implicitly have AppLifecycleBehavior of "unmanaged" unless otherwise specified. One of the following values: "systemManaged" , "unmanaged". No

Child elements

Child element Description
uap:ApplicationContentUriRules Specifies which pages in the web context have access to the system's geolocation devices (if the app has permission to access this capability) and access to the clipboard.
Extensions (type: CT_ApplicationExtensions) Defines one or more extensibility points for the app.
uap7:Properties Specifies properties of the app.
uap:VisualElements Describes the visual aspects of the app: its default tile, logo images, text and background colors, initial screen orientation, splash screen, and lock screen tile appearance.

Parent elements

Parent element Description
Applications Represents one or more apps that comprise the package.

Remarks

The Application element contains attributes that are common to the extensibility points that pertain to the app. This info is used by other extensibility points to get info about the app. Application attributes are also used as activation info in the startup and management of an instance of the app (in other words, they describe how to start a process, and with what behavior).

The StartPage attribute applies only to JavaScript apps. If StartPage isn't specified, then both the Executable and EntryPoint attributes must be specified (and that applies only to C#, C++, or VB apps).

uap10 was introduced in Windows 10, version 2004 (10.0; Build 19041)

The uap10 namespace (for uap10:RuntimeBehavior and uap10:TrustLevel) was introduced in Windows 10, version 2004 (10.0; Build 19041). If your package installs on systems older than that, then you need to provide an equivalent combination of attributes (see the following section), otherwise the activation info will be incomplete, and the install will fail.

But if your package has <TargetDeviceFamily MinVersion="10.0.19041.0">, or higher, then it installs only on systems that support the uap10 namespace. In that case, you should use the uap10:RuntimeBehavior and uap10:TrustLevel attributes in preference to the older equivalent combinations (see the following section).

Combinations of activation info attributes

You can specify activation info attributes on the Application element; and you can optionally specify them on an app-scope Extension element. If they're not specified on Extension, then they're inherited from the parent Application. You specify these attributes in combinations—for example, EntryPoint, RuntimeBehavior, and TrustLevel have overlapping meaning, and they're specified (and/or inherited) in combinations. Here are some valid combinations of activation info attributes.

  1. Executable, uap10:RuntimeBehavior="packagedClassicApp", uap10:TrustLevel=["mediumIL", or "appContainer" (the default if omitted)]
  2. Executable, uap10:RuntimeBehavior="win32App", uap10:TrustLevel="mediumIL" (for other requirements, see the Description earlier in this topic for uap10:RuntimeBehavior).
  3. Executable, EntryPoint="windows.fullTrustApplication" (equivalent to uap10:RuntimeBehavior="packagedClassicApp", uap10:TrustLevel="mediumIL")
  4. Executable, EntryPoint="windows.partialTrustApplication" (equivalent to uap10:RuntimeBehavior="packagedClassicApp", uap10:TrustLevel="appContainer")
  5. Executable, EntryPoint="<anything else>"

As you can see, if your target system doesn't support the uap10 namespace, then you can specify the EntryPoint attribute instead. Similarly, the equivalent of uap10:TrustLevel="appContainer"` on older systems is EntryPoint="windows.partialTrustApplication".

It is redundant to specify both uap10:RuntimeBehavior/uap10:TrustLevel and EntryPoint at the same time, but if you do, then it's an error if they contradict.

Universal Windows Platform (UWP) app activations require EntryPoint. So if you specify Executable and uap10:RuntimeBehavior="windowsApp" (with no EntryPoint), then that's an error. In this same case, EntryPoint would specify something other than "windows.fullTrustApplication" and "windows.partialTrustApplication"; and values other than those two already say the same thing as uap10:RuntimeBehavior="windowsApp". So uap10:RuntimeBehavior would be redundant in this case, and you'd specify Executable and EntryPoint.

Setting uap10:RuntimeBehavior="win32App" and uap10:TrustLevel="appContainer" isn't supported.

Setting uap10:TrustLevel="mediumIL" while uap10:RuntimeBehavior="windowsApp" requires the Microsoft.coreAppActivation_8wekyb3d8bbwe Custom Capability.

This is also true if uap10:TrustLevel="mediumIL" and EntryPoint is any other value than "windows.fullTrustApplication" or "windows.partialTrustApplication".

You can read more about this custom capability here in Custom Capabilities.

Important notes about multi-instancing apps

  • If an app declares SupportsMultipleInstances within the Application element, then all foreground extensions will also be multi-instanced.
  • If the app declares SupportsMultipleInstances within the Application element, then it does not need to be declared at the Extensions level (for example, in a BackgroundTasks or AppService element).
  • The app should only declare SupportsMultipleInstances on background tasks, background audio, or app services.
  • Console apps will always be multi-instanced and must explicitly declare SupportsMultipleInstances.
  • Apps can use the ResourceGroup declaration in the manifest to group multiple background tasks into the same host. This conflicts with multi-instancing, where each activation goes into a separate host. Therefore, an app cannot declare both SupportsMultipleInstances and ResourceGroup in the manifest.

For more info about using the SupportsMultipleInstances attribute to support multiple, separate instances of UWP apps, see Create a multi-instance Universal Windows App.

Requirements

Item Value
Namespace http://schemas.microsoft.com/appx/manifest/uap/windows10
desktop4 attributes http://schemas.microsoft.com/appx/manifest/desktop/windows10/4
uap10 attributes http://schemas.microsoft.com/appx/manifest/uap/windows10/10