Export (0) Print
Expand All

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.

For a complete listing of the XML schema, see Manifest File Schema.

Application manifests have the following elements and attributes.

ElementAttributesRequired
assemblyYes
 manifestVersionYes
noInheritNo
assemblyIdentityYes
 typeYes
 nameYes
 languageNo
 processorArchitectureNo
 versionYes
 publicKeyTokenNo
compatibilityNo
applicationNo
supportedOSIdNo
dependencyNo
dependentAssemblyNo
fileNo
 nameNo
 hashalgNo
 hashNo
autoElevateNo
disableThemingNo
disableWindowFilteringNo
dpiAwareNo
highResolutionScrollingAwareNo
magicFutureSettingNo
printerDriverIsolationNo
ultraHighResolutionScrollingAware

 

File Location

Application manifests should be included as a resource in the application's EXE file or DLL.

For more information, see Installing Side-by-side Assemblies.

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.

AttributeDescription
manifestVersionThe 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.

AttributeDescription
typeSpecifies the application or assembly type. The value must be Win32 and all in lower case. Required.
nameUniquely names the application or assembly. Use the following format for the name: Organization.Division.Name. For example Microsoft.Windows.mysampleApp. Required.
languageIdentifies 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 "*".

processorArchitectureSpecifies the processor. The valid values are x86 for 32-bit Windows and ia64 for 64-bit Windows. Optional.
versionSpecifies 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.
publicKeyTokenA 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.

AttributeDescription
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.

For info about the Id attribute behavior in Windows, see the Windows 8 and Windows Server 2012 Compatibility Cookbook.

The following GUIDs correspond with the indicated operating systems:

{1f676c76-80e1-4239-95bb-83d0f6d0da78} -> Windows 8.1 and Windows Server 2012 R2

{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38} -> Windows 8 and Windows Server 2012

{35138b9a-5d96-4fbd-8e2d-a2440225f93a} -> Windows 7 and Windows Server 2008 R2

{e2011457-1546-43c5-a5fe-008deee3d3f0} -> Windows Vista and Windows Server 2008

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.

AttributeDescription
nameName of the file. For example, Comctl32.dll.
hashalgAlgorithm used to create a hash of the file. This value should be SHA1.
hashA 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.


<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
 ...
  <asmv3:application>
    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2011/WindowsSettings">
      <disableWindowFiltering>true</disableWindowFiltering>
    </asmv3:windowsSettings>
  </asmv3:application>
 ...
</assembly>


dpiAware

Specifies whether the current process is dots per inch (dpi) aware. TRUE indicates that the current process is dpi aware. dpiAware has no attributes.


<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
 ...
  <asmv3:application>
    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2011/WindowsSettings">
      <dpiAware>true</dpiAware>
    </asmv3:windowsSettings>
  </asmv3:application>
 ...
</assembly>


highResolutionScrollingAware

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.


<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
 ...
  <asmv3:application>
    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2011/WindowsSettings">
      <printerDriverIsolation>true</printerDriverIsolation>
    </asmv3:windowsSettings>
  </asmv3:application>
 ...
</assembly>


ultraHighResolutionScrollingAware

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

Example

The following is an example of an application manifest for an application named MySampleApp.exe. The application consumes the SampleAssembly side-by-side assembly.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
      <application> 
        <!--This Id value indicates the application supports Windows Vista functionality -->
          <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 
        <!--This Id value indicates the application supports Windows 7 functionality-->
          <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
        <!--This Id value indicates the application supports Windows 8 functionality-->
          <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
        <!--This Id value indicates the application supports Windows 8.1 functionality-->
          <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
      </application> 
  </compatibility>

  <assemblyIdentity type="win32" 
                    name="myOrganization.myDivision.mySampleApp" 
                    version="6.0.0.0" 
                    processorArchitecture="x86" 
                    publicKeyToken="0000000000000000"
  />
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" 
                        name="Proseware.Research.SampleAssembly" 
                        version="6.0.0.0" 
                        processorArchitecture="X86" 
                        publicKeyToken="0000000000000000" 
                        language="*"
      />
    </dependentAssembly>
  </dependency>
</assembly>

 

 

Community Additions

ADD
Show:
© 2014 Microsoft