I have created an MFC application using Visual Studio 2008 which is working fine on Windows XP. But when I try to execute the same EXE file in Windows Vista I am getting:
Error: Application has failed to start because its side-by-side configuration is incorrect
When I check the event viewer then below is what it says:
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>
You have no CRT runtime DLL on the target machine. To avoid this you can install VC9 redistributables or you can link your program with the runtime statically (more info). This question could be helpful also.