Ivan Kolev <firstname.lastname@example.org> wrote in
I'll bet I know what's going on here - you (OP) have VC9+SP1 right? Well
the default behavior says use v9.0.21022.8 of the dll. SP1 is
9.0.30729.1. So your code is linked to 30729, but the manifest says load
21022. (If you actually install the runtime dlls, then the registry is
setup to redirect 21022 to 30729) I was distributing (localapp) the 30729
version of MFC/RTL, and ran into this. It took a long time and many
DLL-hell to this - at least you could figure it out!
Now you need to know the super-secret magic word. Ready...?
_BIND_TO_CURRENT_VCLIBS_VERSION. Look at the
intermediate output directory - and make sure it's what you want. To get
just the single 20729 entry, you'll need to recompile _everything_ with
that flag set - all dlls, static libs, etc...
Note, if you use 3rdParty dlls that have been compiled using 21022, you
will have multiple entries - then the only workaround I know of is it
actually install the redist so the SxS stuff is setup right. Or
statically link (for my open source project, that's what I did).