tags:

views:

204

answers:

1

I am building a Win32 C++ project on VS2008 SP1. In created .manifest file I see

<assemblyIdentity 
    type='win32'
    name='Microsoft.VC90.DebugCRT' 
    version='9.0.21022.8'
    processorArchitecture='x86' 
    publicKeyToken='1fc8b3b9a1e18e3b' />

How can I get it compiled against 9.0.30729?

+2  A: 

Add
#define _CRT_ASSEMBLY_VERSION "9.0.30729.1"
to your project. Preverably to the stdafx.h.

Simon Linder
Thank you for your response. But now I get both dependencies in .manifest file: 9.0.30729.1 and 9.0.21022.8. How can I get rid of the 9.0.21022.8?
alex2k8
Yes that is correct. If I'm correct it means that your dependency is either 21022 or 30729. So I think it doesn't matter. You could also try #define _BIND_TO_CURRENT_CRT_VERSION 1 (=newest version) or 0 (=oldest version). So by defining 1 you may get rid of 21022.
Simon Linder
Thank you! _BIND_TO_CURRENT_CRT_VERSION worked! Also by using this as a keyword found an interesting page http://stackoverflow.com/questions/59635/app-does-not-run-with-vs-2008-sp1-dlls-previous-version-works-with-rtm-versions
alex2k8