I created a simple Win32 application to demonstrate UXtheme on XP by including a manifest dependency on the ver 6 commctl32.dll
I then created a simple Win32 dll, built it with ISOLATION_AWARE_ENABLED
, and tested it with an embedded manifest specifying both version 5 and 6 of Comctl32.dll
I successfully got the exe and dll to use different versions of comctl32.dll using this method. Both with the exe using 5 and the dll version 6, and the other way around.
Then, I reset the app AND the dll to have a comctl ver 5 manifest dependency. And introduced an application configuration file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration>
<windows>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" processorArchitecture="amd64" publicKeyToken="6595b64144ccf1df"/>
<bindingRedirect oldVersion="5.82.7100.0" newVersion="6.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</windows>
</configuration>
Now, when I run my application, the applications is clearly being redirected to commctl v6 - dialogs are clearly displayed using the XP UXTheme enabled. However, the dll is not being redirected and is using the non themed ver 5 of commctl.
There is no mention of per-dll config files for doing bindingRedirects in the documentation. And trying to create one does not do anything.
I do also know that doing a bindingRedirect from one major version of an assembly to another is not a supported scenario, but Im really just using commctl32 as an obvious easy way to test the mechanics.
How do I redirect the version of a dependent assembly of a dll?