So, when I make a simple VC 2008 console Hello World exe project, and use the technique described, I get the following manifest generated for my executable:
Code: Select all
<?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.CRT' version='9.0.21022.8' processorArchitecture='x86' />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC90.MFC' version='9.0.21022.8' processorArchitecture='x86' />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
</assembly>
So the technique given with that header file isn't working to suppress VC9's generation of a dependency entry, and this causes errors noted in depends.exe:
crtmadness.PNG
Note that even though the dependency was found properly, when you try to execute the program, you get
crtmadness_error.PNG
It's not my top priorty atm -- I reverted back to my standard fix for this in a development environment, which is to make a dummy executable and package it up using the VS Deployment project type to make a poor-man's CRT .msi installer, for systems that don't have VS 2008 installed on them. And given that we're going to need an installer for any released product anyway, I'm not too worried about it atm. Just wanted to let you know that the technique isn't good for VC9 deployments. So whatever they used in that link, xad, isn't this technique.
For the sake of completeness, here is the CRT manifest file (the one copied from the vc/redist directory, modified locally per Assaf):
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<noInheritable></noInheritable>
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.30729.1" processorArchitecture="x86"></assemblyIdentity>
<file name="msvcr90.dll" hashalg="SHA1" hash="9785b1c493deb5b2134dc4aef3719cee207001bc">
</file>
<file name="msvcp90.dll" hashalg="SHA1" hash="0f6bbf7fe4fb3fca2cb5b542eca1a1cad051f01c">
</file>
<file name="msvcm90.dll" hashalg="SHA1" hash="7f3290ab2b7444c2b4a9b1fedfdb16466d7a21bb">
</file>
</assembly>
I'll note that none of the modifications mentioned, Assaf, were actually needed, to make the executable recognize the local CRT files; that magic is done in that header file with the linker pragma. It's just that there doesn't seem to be enough magic in a VC9 environment...
You do not have the required permissions to view the files attached to this post.