why i don't have Microsoft.VC80.MFC-file?

眉间皱痕 提交于 2019-12-23 10:28:30

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/4023936/why-i-dont-have-microsoft-vc80-mfc-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!