开发者

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

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 generatio开发者_如何学运维n 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜