使用 COM 服务器的并行错误,C++可再发行安装
我遇到了一个尴尬的情况,我有一个必须在 x64 应用程序中使用的 32 位库。为了解决这个问题,我创建了一个 COM 服务器应用程序来处理 32 位和 64 位进程之间的通信。
一切都是在 Windows 7 版本 8.0.50727.867
上的 VS2005 中构建的。我注意到的一件事是我的版本与 SP1 redist 版本 (8.0.50727.762
) 不匹配。我认为这是由于 VS2005 的 Vista 更新造成的,因为我找不到更高版本的 redist。
它可以在我的开发机器上运行,但不能在我的 Win7 x64 机器上运行。错误是:
“C:\Program Files\ScanScope\Controller\ACBarOmniServer.exe”的激活上下文生成失败。无法找到依赖程序集 Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.6195"。请使用sxstrace.exe进行详细诊断。
在此之前,我已经安装了 VS2005 C++ 可再发行软件包。我尝试再次安装,但没有成功。我翻遍了 Winsxs 文件夹,果然,该版本丢失了。
当我从此处运行 redist 安装程序时,我得到以下版本我的 sxs 文件夹中的 CRT 的:
- 8.0.50727.42
- 8.0.50727.762
- 8.0.50727.4053
- 8.0.50727.4940
当然,我需要版本8.0.50727.6195
。
我已经将所有可以设置的内容设置为静态链接(即 /MT、静态链接到 MFC,没有链接到 ATL),但其他内容取决于 C 运行时的动态版本。
我用过 sxstrace 但没有运气。我启动跟踪,启动程序,获取错误,结束跟踪,并将其解析到不同的文件中。解析后的文件完全是空的。
一件有趣的事情需要注意;当我在 Win7 机器上运行 redist 安装程序时,它会在一两秒内完成并消失。现在,我确实看到它安装在“添加/删除程序”中,并且确实将文件夹添加到 sxs 文件夹中,但这让我觉得很奇怪。
如果有人有任何这方面的经验,我们将不胜感激。如果您需要我遗漏的任何信息,请告诉我。
I have an awkward situation in which I have a 32-bit lib that must be used in a x64 application. To solve this problem I have created a COM server application to handle communication between the 32-bit and 64-bit processes.
Everything is built in VS2005 on Windows 7, version 8.0.50727.867
. One thing I noticed is that my version does not match up with the SP1 redist version (8.0.50727.762
). I am thinking that this is due to the Vista update for VS2005 as I cannot find a later version of the redist.
It works on my dev machine, but it does not on my Win7 x64 box. The error is thus:
Activation context generation failed for "C:\Program Files\ScanScope\Controller\ACBarOmniServer.exe". Dependent Assembly Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.6195" could not be found. Please use sxstrace.exe for detailed diagnosis.
Prior to this I had installed the VS2005 C++ redistributable package. I tried installing it again, no luck. I rummaged through my Winsxs folder and, sure enough, the version is missing.
When I run the redist installer from here I get the following versions of the CRT in my sxs folder:
- 8.0.50727.42
- 8.0.50727.762
- 8.0.50727.4053
- 8.0.50727.4940
Of course, I need version 8.0.50727.6195
.
I have set everything I can to link statically (i.e., /MT, static link to MFC, no link to ATL), but something else depends on teh dynamic version of the C runtime.
I have used sxstrace with no luck. I start the trace, launch my program, get the error, end the trace, and parse it into a different file. The parsed file is completely empty.
One interesting thing to note; when I run the redist installer on the Win7 box it completes in literally a second or two and disappears. Now, I do see it installed in Add/Remove programs and it does add folders to the sxs folder, but this struck me as odd.
If anyone has any experience with this help would be much appreciated. If you need any info that I have left out please let me know.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在此处找到了正确的可再发行补丁。
这是发送给 VS2005 用户的更新,而不是发送给公众的更新。 叹气,哦,好吧。
Found the correct redistributable patch here.
This was an update sent to VS2005 users, but not to the general public. sigh, oh well.