In Visual Studio 6.0, developing C++ user interface add-ins (DLLs) for applications like Explorer or Internet Explorer with themed interfaces (for example, you want your IE toolbar to sport the new XP style buttons) was accomplished using some funny modifications to your resource files. In Visual Studio 2005, embedded assembly manifest files are generated automatically, so the old method of creating your own assembly manifest doesn’t work. (You’ll get an error like “fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409 CVTRES”) 2005 makes adding dependent assemblies pretty easy, although the options for doing it can be a little hard to find. Here’s how:
Project Properties (right click on the project in the solution explorer pane and select properties)
Configuration Properties -> Linker -> Manifest File
1) Generate Manifest should be Yes
2) Allow Isolation should be Yes
3) Select the “Additional Manifest Dependencies” option, and click the the little “…” button
You’ll get a nice little editor where you can add custom assembly dependencies. Every line you add gets piped directly to the linker as a /MANIFESTDEPENDENCY option. Here’s a doc on MSDN about this option. Note, you can also do this via #pragma, but putting it in the settings makes better sense.
Now, in the old MSVC manifest fix, you added a XML manifest dependency file to your project’s resources that looked something like this:
In 2005, you use the command line MANIFESTDEPENDENCY options, so the above common controls 6.0 dependency would look like this:
"type='Win32' name='Microsoft.Windows.Common-Controls' version='22.214.171.124' processorArchitecture='X86' publicKeyToken='6595b64144ccf1df' language='*'"
Copy the whole line (ignore the weird formatting, it’ll space right in VS) and add it to the upper editor window (including quotes) and hit OK. That should do it!
Updated – added ‘code’ markup to address a problem pointed out in the comments!
Updated – redirected the msdn link to a search on google. The top link should be the right one.