To add a manifest to the application, you need to create the MyApp.manifest file and add it to the application resource file:
//-- This define is normally part of the SDK but define it if this //-- is an older version of the SDK.
In newer versions of Visual Studio, there is the Manifest Tool tab found in the project settings, and the Additional Manifest Files field found on this tab can also be used to define the manifest file.
Here is a simple MyApp.manifest file for a Win32 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.1" processorArchitecture="X86" name="Microsoft.Windows.MyApp" type="win32" /> <description>MyApp</description> </assembly>
If the application depends on other DLLs, this data can also be added to the manifest, and Windows will use this information to make sure your application always uses the correct versions of these dependent dlls.
For example, here is the manifest dependency data for shared management libraries and version 8.0 C:
<dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b" /> </dependentAssembly>
source share