Sometimes, after uninstalling previous beta or Community Tech Preview (CTP) versions of Visual Studio 2005 (codename Whidbey) and then installing newer builds, the IDE may crash or display an error dialog stating “This application has failed to start because the application configuration is incorrect” after installing a newer beta or CTP.
This is normally caused by orphaned Visual C++ runtime assemblies left behind in the %windir%\WinSxS folder after uninstalling the previous build.
Steps to fix this issue
You can use the following steps to resolve this issue in most cases:
- Create a batch file that has the following commands and run it from a cmd prompt (you can also get a copy of this script in text file format here):
for /D %%i in (*vc80*) do rd %%i /s /q
del manifests\*vc80* /q
for /D %%i in (*vc80*) do del %%i\* /q
- Launch Visual Studio 2005 setup again from the entry in Add/Remove Programs or by rerunning setup.exe from the original installation location
- Choose the option to repair Visual Studio 2005
- After repair completes, re-launch the Visual Studio IDE
In most cases, these errors will cause entries to be written to the System event log. You can run eventvwr.exe and look for error messages with event source “SideBySide”.
Another common symptom of this problem is that the file %ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\devenv.exe.manifest contains a reference to one or more dependent assemblies for Visual C++ runtime files with incorrect version numbers. The most common incorrect version I have seen is 8.0.41204.256. Unfortunately, this problem cannot be fixed by simply editing devenv.exe.manifest. Instead you will need to follow the 4 steps listed above to remove the orphaned files and repair VS 2005.