我创建了一个 MFC使用 Visual Studio 2008 的应用程序,它在 Windows XP 上运行良好。但是当我尝试在 Windows Vista 中执行相同的 EXE 文件时我得到:
Error: Application has failed to start because its side-by-side configuration is incorrect
当我检查事件查看器时,下面是它所说的:
Log Name: Application
Source: SideBySide
Date: 12/10/2010 10:06:08 AM
Event ID: 33
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: WIN-8A4INI0BH2R
Description:
Activation context generation failed for "C:\MyApp.exe". Dependent Assembly Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="SideBySide" />
<EventID Qualifiers="49409">33</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2010-12-10T04:36:08.000Z" />
<EventRecordID>181</EventRecordID>
<Channel>Application</Channel>
<Computer>WIN-8A4INI0BH2R</Computer>
<Security />
</System>
<EventData>
<Data>Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"</Data>
<Data>
</Data>
<Data>
</Data>
<Data>C:\MyApp.exe</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>
最佳答案
目标机器上没有 CRT 运行时 DLL。为避免这种情况,您可以安装 VC9 可再发行组件,或者您可以将您的程序与运行时静态链接 (more info)。 This question也可能有帮助。
关于c++ - 错误 : "Application has failed to start because its side-by-side configuration is incorrect",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4405872/