Hi,
A second thought: the issue with msvcr DLL may (MAY) be due to a Side-by-side (SxS) issue.
You are probably familiar with SxS: it is a way MS devised to allow multiple versions of the same DLL to co-exist and the app (or the system) to choose the best match. Many (me included) think it is not worth the hassle, but it is there and we have to cope with it.
To let the system know about app's preferences about SxS-ed DLL's, the app needs to include a "manifest".
Now, msvcrXX.dll are SzS-ed DLL's and you had an error with the mt.exe tool, which is precisely the tool embedding a manifest in the app (the error seems to be intermittent, but it is a hint of possible mis-configuration anyway).
If you have a hex editor, look in the app .exe file for the string "manifestVersion"; if the app is manifest-ed correctly you should locate a text chunk like this:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC90.DebugCRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
[possibly most <dependency>...</dependency> tags following]
</assembly>
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC90.DebugCRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
[possibly most <dependency>...</dependency> tags following]
</assembly>
To copy to clipboard, switch view to plain text mode
If there is no embedded manifest in the app, or the manifest does not reference the 'right' SxS (which the 'right SxS is, it is not always clear), your app will not find the DLL, no matter of PATH's and other settings.
I have noticed that sometime mt.exe does not do the right job and embeds an empty manifest; often by re-running it, things go better...
Just in case: the SxS-ed DLL's reside in the "<WindowsMainFolder>\WinSxS" folder; each has its own sub-folder (looking like "\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0 .21022.8_x-ww_597c3456\"); each also needs some registry settings (simply adding the sub-folder is not enough) and I never understood which.
If all of this simply looks like a mess... I agree with you.
Ciao,
Miwarre
Bookmarks