I have a mixed-mode DLL built in visual studio 2005. In dependency walker, my DLL is showing a dependency of the following CRT Dlls. Note this is on my Windows 7 developement machine.
c:\windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_none_d08a205e442db5b5\MSVCP80.DLL
"\MSVCR80.DLL
"\MSVCM80.DLL
8.0.50727.4927
On my Windows 7 dev machine using Visual Studio 2005 this compiles and runs just fine. the problem is it wont run on my Windows XP test machine with the latest CRT installed.
When I drag the DLL into depenency walker on the XP machine it seems to be searching for the DLLs in \System32... (I went to show full path and there was no paths for them, just a yellow exclamation mark)
The problem is that this version (build 4927) of the crt in WinSxS is not installed on the XP test machine. it has Visual Studio 2005 with the latest CRT installed (sp1?).
8.0.50727.4053 is the latest version I could find on MSDN.
I realize this is not the most exciting question posted on SO, but does anyone know what is up with this 4927 runtime?
* EDIT *
The manifest generated by MT.exe:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.4053" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
&开发者_运维百科lt;dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
So, there is 3 different versions it is targeting...
Revision 4927 is a Windows 7 specific version, probably used by Microsoft binaries. Your build should not create a dependency on it, 4053 is the last one for VS2005. Don't troubleshoot this with depends.exe btw, it isn't good at tracking winsxs dependencies.
Start troubleshooting this by double-checking what dependency your build generates. First look in vc\include\crtassem.h, the _CRT_ASSEMBLY_VERSION macro generates the manifest entry. Next is to check the manifest that's embedded in your executable. Your project's Release directory contains the .embed.manifest file that was embedded. And File + Open + File on your executable lets you peek at the actual embedded RT_MANIFEST resource.
精彩评论