VC ++ CRT Redist问题 [英] VC++ CRT Redist problem

查看:506
本文介绍了VC ++ CRT Redist问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用C ++和Visual Studio 2008开发了一个64位的dll,我试图使用'regsvr32.exe'在目标机器上注册它。我检查清单文件,它清楚地说明需要什么版本的CRT:

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

当我尝试注册文件时,我总是得到一个并排的错误信息,应用程序设置不正确,我应该重新安装它。


日志错误:生成激活上下文
失败...参考错误消息:您的系统上未安装
引用的程序集


目标机器运行Windows Xp Professional 64位。我试图安装相应的VC ++可再分发软件包(VC ++ 2008 Redist x86 x64 ),创建一个设置并包括相应的合并模块(microsoft_vc90_crt_x86_x64.msm),安装所有VC ++可再发行包等。



如果我检查依赖文件,并且它们正确位于WinSxS文件夹内,但如果我运行Dependency Walker的文件,它会抱怨



如果我生成的32位文件,它将正确地注册在32位操作系统上。



感谢,



Adrian。

p>

EDIT *这只能在Win XP 64上重现,在Windows 7 64位上都可以正常工作。



这里最重要的是,exe可重新分发包括策略文件,合并模块不是这样的需要单独添加。


I've developed a 64 bit dll using C++ and Visual Studio 2008 and i'm trying to register it on a target machine using 'regsvr32.exe'. I've checked the manifest file and it clearly states what version of CRT is needed:

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

When i try to register the file i always get a side-by-side error message stating that the application settings are incorrect and that i should reinstall it.

Log Error: Generate Activation Context failed... Reference error message: The referenced assembly is not installed on your system.

The target machine runs Windows Xp Professional 64 bit. I've tried to install the corresponding VC++ redistributable package( VC++ 2008 Redist x86 and x64 ), create a setup and include the corresponding merge module ( microsoft_vc90_crt_x86_x64.msm ), install all VC++ redistributable packages etc. No matter what's installed it will always fail.

If i check for the dependent files and they are correctly located inside the WinSxS folder, but if i run Dependency Walker on the file it will complain too that the files from the VC9 CRT could not be found.

If i build the file for 32 bit it will correctly register on a 32 bit OS. I'm running out of ideas so any help is very appreciated.

Thanks,

Adrian.

EDIT *This is reproductible only on Win XP 64, all works fine on Windows 7 64 bit.

解决方案

In the end I've managed to fix this by including a newer version of C++ redistributable merge modules into the setup along with all the required policy merge modules in order to redirect the calls to any old version to the new one that's available.

Most important thing here is that the exe redistributable include the policy files and the merge modules don't so they need to be separately added.

这篇关于VC ++ CRT Redist问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆