在我的清单文件中获取错误的 C 运行时版本 (Visual Studio 2008)
我在 Visual Studio 2008 中构建应用程序时遇到问题。我已在项目属性中声明以下内容:
_BIND_TO_CURRENT_MFC_VERSION=1 _BIND_TO_CURRENT_CRT_VERSION=1 _BIND_TO_CURRENT_ATL_VERSION=1
当我在 VS2008 中构建应用程序时,它会生成一个 middle.manifest 文件,其中包含:
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC90.CRT' version='9.0.30729.1' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
现在,该计算机安装了较新的 C 运行时 DLL(可以在 WinSxS 文件夹中找到版本 9.0.30729.4148)。上面的预处理器定义应该告诉 VS 使用最新的运行时 DLL,但它似乎并没有这样做。有谁能够解释为什么 dev studio 不会在清单中显示这些 DLL 的较新版本?我可以在其他机器上构建相同的应用程序,并在清单文件中获取正确的编号,因此它一定是这台机器的设置所特有的,但我不知道是什么。
我遇到问题的机器是 Windows 2003 SP2 服务器。谁能透露一下开发工作室如何确定最新的运行时版本是什么?
谢谢, 阿尔。
I am having a problem with building an application in Visual Studio 2008. I have declared the following in my project properties:
_BIND_TO_CURRENT_MFC_VERSION=1
_BIND_TO_CURRENT_CRT_VERSION=1
_BIND_TO_CURRENT_ATL_VERSION=1
When I build my application in VS2008 it generates an intermediate.manifest file which contains:
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC90.CRT' version='9.0.30729.1' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
Now, this machine has newer C runtime DLLs installed (version 9.0.30729.4148 can be found in the WinSxS folder). The pre processor definitions above are supposed to tell VS to use the latest runtime DLLs, but it doesn't appear to be doing so. Is anyone able to explain why dev studio won't show the newer version of these DLLs in the manifest? I can build the same application on other machines and get the right number in the manifest file, so it must be something peculiar to the setup of this one machine, but I don't know what.
The machine where I am having the problem is a Windows 2003 SP2 server. Can anyone shed any light on how dev studio works out what the latest runtime version is?
Thanks,
Al.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确实拥有旧版本的 CRT。版本号在 vc\include\crtassem.h 包含文件中设置。 Windows Update 应该已经为您提供了去年 7 月发布的安全更新。它还更新 CRT .h 和 .lib 文件。也许您是从另一个程序的安装程序获得该版本的。
如果您不想打开 Windows 更新,则可以获取安全更新 从这里。请注意,它启动的下载相当大。
You indeed have an old version of the CRT. The version number is set in the vc\include\crtassem.h include file. Windows Update should have given you the security update that was released in July of last year. It also updates the CRT .h and .lib files. Maybe you got that release from an installer of another program.
If you don't want to turn on Windows Update then you can get the security update from here. Beware that the download it starts is rather large.