Setting the correct manifest version
The Windows Vista Controls for .NET 2.0
library makes direct calls in Windows Vista's new common control DLL (comctl32.dll, version 6.0). For backwards compatibility reasons, applications with the default manifest or without a manifest automatically
load the old
version of the common controls (that is, version 5.0). Some calls will then fail at runtime, because the new Vista DLL entry points do not exist.
Therefore, you must
add a custom manifest to your project in order to tell Windows to load the new DLL (this is especially true for the Task Dialog class, which contains many calls which will fail with the wrong common controls library).
Add the manifest file
Add a new text file to your project, with the following name: <project name>.exe.manifest
A basic manifest that expresses the dependecy on comctl32.dll version 6.0 goes as following:
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"
Embed the manifest
That's it. Your application will now load the new Vista comctrl32 DLL and Task Dialog (and every other feature of the library) will work as expected. :)