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:
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
<?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>
<assemblyIdentity>
element as follows:
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.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.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.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.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.
<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.
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.
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.
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.