0
votes

I have some strange issues with SxS binding. I have vendor DLLs that depend on VC9's CRT, MFC, and OpenMP. Originally these DLLs pointed to an old CRT (21022.8), but I updated their manifests to point to the latest release (30729.6161). I need these DLLs to work on client machines without needing the VC9 redistributable installed (i.e. non-administrator install). It's hard to test on my developer machine because I can't get entirely rid of the VC9 redistributable: too many applications are using it (e.g. Everything search, Google Backup). I can delete MFC and/or OpenMP from winsxs though (and the accompanying policy/manifest files).

When I delete OpenMP, I get a SxS configuration error that shows up in the event viewer and I can trace it with sxstrace.exe. Doing that led me to put a Microsoft.VC90.OpenMP.manifest file beside my application along with the vcomp90.dll, and that allowed the app to use the local OpenMP.

But when I delete MFC, I don't get a side-by-side error. Instead I get a popup dialog saying The program can't start because mfc90.dll is missing from computer.. Even after giving my application the Microsoft.VC90.MFC.manifest file, it won't find the mfc90.dll sitting right next to the executable. Because it's not a side-by-side error, sxstrace.exe doesn't tell me anything.

When I monitor DLL access with Process Monitor, I see that it is binding to the VC90.CRT in winsxs (which I can't get rid of because it's in use). Then, without looking in the local directory, it looks for mfc90.dll in winsxs, doesn't find it, then gives the error without looking in any other place.

Why is it behaving this way and how do I fix it?

edit: I don't know if it's relevant, but the vendor DLLs are COM-based which I've wrapped/isolated with Interop DLLs. So I actually only get the The program can't start error when it tries to create the COM object.

Question title and question body ask different questions. Which one did you mean to ask? If it's the title, try to enable loader snaps.IInspectable
All 3 questions ideally (how to trace it, why it's doing that, and how to fix it). I figured knowing the title question would lead to answers for the other 2 questions, but I'd be ok to skip that step. :) Thanks for the tip on loader snaps, I'm trying that.Matt Chambers