Application Manifests

An application manifest is an XML file that describes and identifies the shared and private side-by-side assemblies that an application should bind to at run time. These should be the same assembly versions that were used to test the application. Application manifests may also describe metadata for files that are private to the application.

File Location

File Name Syntax

The name of an application manifest file is the name of the application's executable followed by .manifest.

For example, an application manifest that refers to Example.exe or Example.dll would use the following file name syntax. You can omit the <resource ID> field if resource ID is 1.

example.exe.<resource ID>.manifest

example.dll.<resource ID>.manifest

Elements

Names of elements and attributes are case-sensitive. The values of elements and attributes are case-insensitive, except for the value of the type attribute.

assembly

A container element. Its first subelement must be a noInherit or assemblyIdentity element. Required.

The assembly element must be in the namespace "urn:schemas-microsoft-com:asm.v1". Child elements of the assembly must also be in this namespace, by inheritance or by tagging.

The assembly element has the following attributes.

Attribute

Description

manifestVersion

The manifestVersion attribute must be set to 1.0.

noInherit

Include this element in an application manifest to set the
activation contexts generated from the manifest with the "no inherit" flag. When this flag is not set in an activation context, and the activation context is active, it is inherited by new threads in the same process, windows, window procedures, and
Asynchronous Procedure Calls. Setting this flag prevents the new object from inheriting the active context.

The noInherit element is optional and typically omitted. Most assemblies do not work correctly using a no-inherit activation context because the assembly must be explicitly designed to manage the propagation of their own activation context. The use of the noInherit element requires that any dependent assemblies referenced by the application manifest have a noInherit element in their
assembly manifest.

If noInherit is used in a manifest, it must be the first subelement of the assembly element. The assemblyIdentity element should come immediately after the noInherit element. If noInherit is not used, assemblyIdentity must be the first subelement of the assembly element. The noInherit element has no child elements. It is not a valid element in
assembly manifests.

assemblyIdentity

As the first subelement of an assembly element, assemblyIdentity describes and uniquely identifies the application owning this application manifest. As the first subelement of a dependentAssembly element, assemblyIdentity describes a side-by-side assembly required by the application. Note that every assembly referenced in the application manifest requires an assemblyIdentity that exactly matches the assemblyIdentity in the referenced assembly's own assembly manifest.

The assemblyIdentity element has the following attributes. It has no subelements.

Attribute

Description

type

Specifies the application or assembly type. The value must be Win32 and all in lower case. Required.

name

Uniquely names the application or assembly. Use the following format for the name: Organization.Division.Name. For example Microsoft.Windows.mysampleApp. Required.

language

Identifies the language of the application or assembly. Optional. If the application or assembly is language-specific, specify the DHTML language code.

In the assemblyIdentity of an application intended for worldwide use (language neutral) omit the language attribute.

In an assemblyIdentity of an assembly intended for worldwide use (language neutral) set the value of language to "*".

processorArchitecture

Specifies the processor. The valid values are x86 for 32-bit Windows and ia64 for 64-bit Windows. Optional.

version

Specifies the application or assembly version. Use the four-part version format: mmmmm.nnnnn.ooooo.ppppp. Each of the parts separated by periods can be 0-65535 inclusive. For more information, see
Assembly Versions. Required.

publicKeyToken

A 16-character hexadecimal string representing the last 8 bytes of the SHA-1 hash of the public key under which the application or assembly is signed. The public key used to sign the catalog must be 2048 bits or greater. Required for all shared side-by-side assemblies.

compatibility

Contains at least one application. It has no attributes. Optional. Application manifests without a compatibility element default to Windows Vista compatibility on Windows 7.

application

Contains at least one supportedOS. It has no attributes. Optional.

supportedOS

The supportedOS element has the following attribute. It has no subelements.

Attribute

Description

Id

Set the Id attribute to {e2011457-1546-43c5-a5fe-008deee3d3f0} to run the application using Vista functionality. This can enable an application designed for Windows Vista to run on a later operating system.

Set the Id attribute to {35138b9a-5d96-4fbd-8e2d-a2440225f93a} to run the application using Windows 7 functionality.

Applications that support Windows Vista, Windows 7, and Windows 8 functionality do not require separate manifests. In this case, add the GUIDs for all the Windows operating systems.

You can test this on Windows 7 or Windows 8.x by running Resource Monitor (resmon), going to the CPU tab, right-clicking on the column labels, "Select Column...", and check "Operating System Context". On Windows 8.x, you can also find this column available in the Task Manager (taskmgr). The content of the column shows the highest value found or "Windows Vista" as the default.

dependency

Contains at least one dependentAssembly. It has no attributes. Optional.

dependentAssembly

The first subelement of dependentAssembly must be an assemblyIdentity element that describes a side-by-side assembly required by the application. Every dependentAssembly must be inside exactly one dependency. It has no attributes.

file

Specifies files that are private to the application. Optional.

The file element has the attributes shown in the following table.

Attribute

Description

name

Name of the file. For example, Comctl32.dll.

hashalg

Algorithm used to create a hash of the file. This value should be SHA1.

hash

A hash of the file referred to by name. A hexadecimal string of length depending on the hash algorithm.

autoElevate

Specifies whether auto elevate is enabled. TRUE indicates that it is enabled. It has no attributes.

disableTheming

Specifies whether giving UI elements a theme is disabled. TRUE indicates disabled. It has no attributes.

disableWindowFiltering

Specifies whether to disable window filtering. TRUE disables window filtering so you can enumerate immersive windows from the desktop. disableWindowFiltering was added in Windows 8 and has no attributes.

Windows 10, version 1607: The dpiAware element is ignored if the dpiAwareness element is present. You can include both elements in a manifest if you want to specify a different behavior for Windows 10, version 1607 than for an earlier version of the operating system.

The following table describes the behavior that results based upon the presence of the dpiAware element and the text that it contains. The text within the element is not case-sensitive.

The minimum version of the operating system that supports the dpiAwareness element is Windows 10, version 1607. For versions that support the dpiAwareness element, the dpiAwareness overrides the dpiAware element. You can include both elements in a manifest if you want to specify a different behavior for Windows 10, version 1607 than for an earlier version of the operating system.

The following table describes the behavior that results based upon the presence of the dpiAwareness element and the text that it contains. The text within the element is not case-sensitive.

Specifies whether high-resolution-scrolling aware is enabled. TRUE indicates that it is enabled. It has no attributes.

magicFutureSetting

Specifies whether magic-future setting is enabled. TRUE indicates that it is enabled. It has no attributes.

printerDriverIsolation

Specifies whether printer driver isolation is enabled. TRUE indicates that it is enabled. It has no attributes. Printer driver isolation improves the reliability of the Windows print service by enabling printer drivers to run in processes that are separate from the process in which the print spooler runs. Support for printer driver isolation started in Windows 7 and Windows Server 2008 R2. An app can declare printer driver isolation in its app manifest to isolate itself from the printer driver and improve its reliability. That is, the app won't crash if the printer driver has an error.