为什么我没有 Microsoft.VC80.MFC 文件?

发布于 2024-09-29 16:29:09 字数 793 浏览 9 评论 0原文

买了一台新的Win7机器,安装了VS2005。我尝试启动一个使用 Manifest.bin 中的清单构建的 MyApp.exe:

……

<assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50727.4053" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b">
</assemblyIdentity>

结果

是错误消息“应用程序无法启动,因为它的并行配置不正确。事件

查看器详细告诉了我原因:

“c:\Xxx\MyApp.exe”的激活上下文生成失败。Microsoft.VC80.MFC,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type=" win32",version="8.0.50727.4053" 找不到。请使用 sxstrace.exe 进行详细诊断。

所以我浏览了winsxs文件夹,确实所有“4053文件夹”都丢失了。然后我编辑了Manifest.bin并替换了4053 4927。然后我发现我得到了 msvcr80.dll 的“4927-folder”,但 mfc80.dll 没有“4927-folder”。

两个问题:

-为什么没有“4927-folder”。 mfc80.dll?

-如何获取所有“4053-文件夹”?

谢谢 & BR -Matti

Got a fresh Win7 machine with VS2005 installed. I tried to start a MyApp.exe that is built with manifest that says in Manifest.bin:

...

<assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50727.4053" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b">
</assemblyIdentity>

...

and the result was error message "The application has failed to start because it's side-by-side configuration is incorrect...

Event viewer told me the reason in detail:

Activation context generation failed for "c:\Xxx\MyApp.exe". Dependent Assembly Microsoft.VC80.MFC,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4053" could not be found. Please use sxstrace.exe for detailed diagnosis.

so I browsed the winsxs folder and indeed all "4053-folders" were missing. Then i edited Manifest.bin and replaced 4053 with 4927. The errors reocurred with different version. Then I found out that I got "4927-folder" for msvcr80.dll but no "4927-folder" for mfc80.dll.

Two questions:

-Why no "4927-folder" for mfc80.dll?

-How to get all "4053-folders" ?

Thanks & BR -Matti

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

水水月牙 2024-10-06 16:29:09

您应该安装 Visual C++ 可再发行组件或使用合并模块将可再发行组件添加到 Windows Installer 安装包中。或者,您应该将 MFC 库复制到应用程序所在的目录中。

可用作私有程序集(在您的应用程序目录中)的库位于 C:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\x86amd64 中 如果您的应用程序是 64 位。

Windows Installer (MSI) 的合并模块位于 C:\Program Files (x86)\Common Files\Merge Modules 中。

可以在 C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\vcredist_x86.exe 中找到安装所有库的可再发行软件包 32位程序,以及 64 位程序的 ...\vcredist_x64\vcredist_x64.exe 。您可以从 Microsoft Visual C++ 2005 Service Pack 1 可再发行组件包 ATL 安全更新


我认为您想使用此程序包 Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update 更新 Visual Studio。

You should either install Visual C++ redistributable or use merge modules to add the redistributables into your Windows Installer installation package. Or alternatively you should copy MFC libraries in the directory with your application.

Libraries that can be used as private assembly (in your app directory) are located in C:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\x86, or in amd64 if your app is 64 bit.

Merge modules for Windows Installer (MSI) are in C:\Program Files (x86)\Common Files\Merge Modules.

Redistributable package that installs all the libraries can be found in C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86\vcredist_x86.exe for 32 bit programs and in …\vcredist_x64\vcredist_x64.exe for 64 bit programs. You can get these files from Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update.


And I think you want to update Visual Studio with this package Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文