Creating a Manifest for Your Application

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office

Creating a Manifest for Your Application

To deploy applications that use MSXML 5.0 to computers running Windows XP, you must create an application manifest and deploy it with your application.

The application manifest is an XML file that:

  • Uniquely identifies the application
  • Describes dependencies on specific versions of side-by-side assemblies

For example, if your application depends upon the RTM version of MSXML 5.0, write your application manifest so it uses the RTM version of MSXML 5.0 installed in the Windows global store. The following procedure describes how to create a manifest for this purpose.

To create a manifest for your application

  1. Copy this sample manifest and paste it into any text editor.
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity
        version="1.0.0.0"
        processorArchitecture="X86"
        name="Microsoft.Windows.mysampleApp"
        type="win32"
    />
    <description>Your app description here</description>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity
                type="win32"
                name="Microsoft.MSXML2"
                version="5.0.0.0"
                processorArchitecture="X86"
                publicKeyToken="6bd6b9abf345378f"
                language="*"
            />
        </dependentAssembly>
    </dependency>
    </assembly>
  2. After you have pasted the sample code above, you must update it as appropriate for your application. To do this, change the featured values (those in bold in the sample code) of the first <assemblyIdentity> element as follows:
    1. For the version attribute, set the value to the current version number for your component or application. This number is specified in the properties for your project when it is built using Microsoft® Visual Studio.
    2. For the processorArchitecture attribute, only change the value of the processor architecture if you are deploying to a processor architecture that is not Intel-x86 compatible. Otherwise, use the suggested default.
    3. For the name attribute, set the value to the registered name for your application. For most Windows applications, you only need to replace "mysampleapp" with the base name of the executable (.exe) file containing your application.
    4. For the type attribute, only change the value if you are deploying to a version of Windows that does not run under the Win32 API. Otherwise, use the suggested default.
  3. Update the description for your application.

    The <description> element is optional, so you can either update its contents to include a brief description of your application or remove it from your manifest code. If you choose to remove it, be sure to remove both its opening and closing tags and any character data contained within them.

  4. For the dependent assembly section, update the featured attribute values for the <assemblyIdentity> element so that its values are appropriate to your version of MSXML.

    For the version and tokenKey attributes, verify that the values match those used in the assembly manifest that is provided for MSXML 5.0 when it installs under Windows XP. Assembly manifests are located in the special WinSxS/Manifest directory. The assembly manifest file for MSXML 5.0 is called msxml5.manifest.

  5. Save the application manifest to file in the same directory as the executable file for your application.

    Name your manifest file so that it has the same name as your application, and add the ".manifest" extension to the end of it. For example, if your application executable is called test.exe, the manifest file should be named test.exe.manifest.

  6. Decide how to package and deploy your application manifest with your application.

    As an alternative for new applications, you can include the application manifest directly in the header file for your application. In this case, also add the following line to the header file:

    CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.exe.manifest"

    Be sure you update "YourApp.exe.manifest" with the name for your manifest file. After you add the line above to your application header file, the manifest will be directly included with your application binary file the next time it is compiled.

    If you do not choose to include the manifest in this way, include the manifest file separately in the Windows Installer package (.msi) you create to install your application.

    Note   If you provide your manifest both separately and internally in the resource section of your compiled executable, the file system version of your manifest always takes precedence over the one included with the executable file.

  7. Test your application to ensure that you get the results you want.

    Testing your application before deployment is always important, but you should be sure that your test computer does not already have the side-by-side assembly for MSXML 5.0 registered on it. Otherwise, your testing will be compromised and the results will be incorrect.

  8. Deploy or update your application as a Windows Installer package.