#pragma comment manifestDependency

What is this goo used for? It is new in the July CTP:

#pragma comment(linker,"/manifestdependency:\"type='win32' " \
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
"version='" _CRT_ASSEMBLY_VERSION "' " \
"processorArchitecture='x86' " \
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")

We have a special preprocessor that is generating a warning on this for just about every file we process. We get:

expected ')'; found identifier '__LIBRARIES_ASSEMBLY_NAME_PREFIX'

What happens if we remove this macro and it's debug cousin?

--
Keith

[596 byte] By [KeithHill] at [2007-12-16]
# 1
Hi Keith: this is part of the fusion/Side-by-Side install work that we did for this release.

The contents of the #pragma are passed though to the linker which uses them to generate a manifest which binds the generated application to a specific version of the CRT. Removing #pragma will mean that the linker will be unable to generate a manifest and thus your application will revert back to the old way of finding a referenced DLL instead of using Fusion to look in the WinSxS directory.

I would advise against removing this #pragma as applications that have manifests are much more robust against "DLL hell" problems.

The macro __LIBRARIES_ASSEMBLY_NAME_PREFIX is defined in crtassem.h is there any way you can make your tool aware of this file?

JonathanCavesMSFT at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2
Thanks for the info. Since it passes the macro through just fine I think I'm going to tweak it to not generate the warning (via a command line option).
KeithHill at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...