C++ Application failed to start after Visual Studio upgrade

Action

Upgrading a Visual C++ application that dynamically links to the MSVC Runtime, MFC, and/or ATL DLLs to a version of Visual Studio 2005 or greater.


Result

Your VC++ application may not launch on target machines due to a missing Microsoft DLL dependency.

When attempting to launch the upgraded application on a target (non-development) machine, you receive the error “This application has failed to start because the application configuration is incorrect.  Reinstalling the application may fix the problem.”

The event viewer will contain error messages in the System log with the Source “SideBySide”.  Messages will reference the application you attempted to launch as well as information such as “The referenced assembly is not installed on your system…” and “Dependent Assembly Microsoft.VC80.CRT could not be found…” or “Dependent Assembly Microsoft.VC90.CRT could not be found…” depending on the version of Visual Studio you upgraded to.


Cause

The MSVC DLLs (MSVCRx0, MFCx0, ATLx0, etc.) now need to be installed in the Windows Side-by-Side folder, WinSxS.


Resolution

There are two solutions:

1. Use a Visual Studio Setup project (in your C++ solution) to install via the vcredist merge module.
2. Run the appropriate redistribution installer (such as vcredist_x86.exe) on the target machine.
a. On your development obtain the vcedist executable at C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86.  (If you are running a 64 bit version of windows this will be in the x86 Program files folder).
b. Copy this to the target computer and execute it.


More Information

Side-by-Side assemblies http://msdn2.microsoft.com/en-us/library/aa376307.aspx (http://msdn2.microsoft.com/en-us/library/aa376307.aspx)
Why C Runtimes install to the WinSxS http://blogs.msdn.com/martynl/archive/2005/10/13/480880.aspx (http://blogs.msdn.com/martynl/archive/2005/10/13/480880.aspx)


DISCLAIMER

MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.



APPLIES TO
Microsoft Visual Studio .NET 2003 Academic Edition
Microsoft Visual Studio .NET 2003 Enterprise Architect
Microsoft Visual Studio .NET 2003 Enterprise Developer
Microsoft Visual Studio .NET 2003 Professional Edition
Microsoft Visual Studio .NET 2003 Service Pack 1
Microsoft Visual Studio 2005 Express Edition
Microsoft Visual Studio 2005 Professional Edition
Microsoft Visual Studio 2005 Standard Edition
Microsoft Visual Studio 2005 Team Suite
Microsoft Visual Studio 2008 Academic Edition
Microsoft Visual Studio 2008 Professional Edition
Microsoft Visual Studio 2008 Standard Edition
Microsoft Visual Studio Team System 2008 Team Suite

——————————————–

Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
Microsoft Corporation. All rights reserved. Terms of Use | Trademarks


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image