Incorrect side-by-side configuration caused by missing runtime libraries

Just before the weekend, I was trying to run an application on a 64-bit installation of Windows Server 2008 and was presented with a strange error:

This application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more details.

I know that side-by-side is something to do with avoiding DLL hell (by not dumping all the DLLs in the same folder with the consequences of one application overwriting another’s libraries) but I didn’t have a clue how to fix it and the application event log didn’t help much:

Log Name: Application
Source: SideBySide
Date: 15/08/2008 18:00:10
Event ID: 33
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer:
computername.domainname.tld
Description:
Activation context generation failed for “C:\
foldername\applicationname.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.

Thankfully, Junfeng Zhang wrote a comprehensive blog post about diagnosing side by side failures. It’s a bit too developery for me but I did at least manage to follow the instructions to produce myself a sxstrace:

=================
Begin Activation Context Generation.
Input Parameter:
        Flags = 0
        ProcessorArchitecture = AMD64
        CultureFallBacks = en-US;en
        ManifestPath = C:\foldername\applicationname.exe
        AssemblyDirectory = C:\foldername\
        Application Config File =
-----------------
INFO: Parsing Manifest File C:\foldername\applicationname.exe.
        INFO: Manifest Definition Identity is (null).
        INFO: Reference: Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Resolving reference Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
        INFO: Resolving reference for ProcessorArchitecture x86.
                INFO: Resolving reference for culture Neutral.
                        INFO: Applying Binding Policy.
                                INFO: No publisher policy found.
                                INFO: No binding policy redirect found.
                        INFO: Begin assembly probing.
                                INFO: Did not find the assembly in WinSxS.
                                INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.CRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.CRT.DLL.
                                INFO: Attempt to probe manifest at C:\foldername\Microsoft.VC90.CRT.DLL.
                                INFO: Attempt to probe manifest at C:\foldername\Microsoft.VC90.CRT.MANIFEST.
                                INFO: Attempt to probe manifest at C:\foldername\Microsoft.VC90.CRT\Microsoft.VC90.CRT.DLL.
                                INFO: Attempt to probe manifest at C:\foldername\Microsoft.VC90.CRT\Microsoft.VC90.CRT.MANIFEST.
                                INFO: Did not find manifest for culture Neutral.
                        INFO: End assembly probing.
        ERROR: Cannot resolve reference Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed.
End Activation Context Generation.

=================
Begin Activation Context Generation.
Input Parameter:
        Flags = 0
        ProcessorArchitecture = Wow32
        CultureFallBacks = en-US;en
        ManifestPath = C:\foldername\applicationname.exe
        AssemblyDirectory = C:\foldername\
        Application Config File =
-----------------
INFO: Parsing Manifest File C:\foldername\applicationname.exe.
        INFO: Manifest Definition Identity is (null).
        INFO: Reference: Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Resolving reference Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
        INFO: Resolving reference for ProcessorArchitecture WOW64.
                INFO: Resolving reference for culture Neutral.
                        INFO: Applying Binding Policy.
                                INFO: No publisher policy found.
                                INFO: No binding policy redirect found.
                        INFO: Begin assembly probing.
                                INFO: Did not find the assembly in WinSxS.
                                INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.CRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.CRT.DLL.
                                INFO: Did not find manifest for culture Neutral.
                        INFO: End assembly probing.
        INFO: Resolving reference for ProcessorArchitecture x86.
                INFO: Resolving reference for culture Neutral.
                        INFO: Applying Binding Policy.
                                INFO: No publisher policy found.
                                INFO: No binding policy redirect found.
                        INFO: Begin assembly probing.
                                INFO: Did not find the assembly in WinSxS.
                                INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.CRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.CRT.DLL.
                                INFO: Attempt to probe manifest at C:\foldername\Microsoft.VC90.CRT.DLL.
                                INFO: Attempt to probe manifest at C:\foldername\Microsoft.VC90.CRT.MANIFEST.
                                INFO: Attempt to probe manifest at C:\foldername\Microsoft.VC90.CRT\Microsoft.VC90.CRT.DLL.
                                INFO: Attempt to probe manifest at C:\foldername\Microsoft.VC90.CRT\Microsoft.VC90.CRT.MANIFEST.
                                INFO: Did not find manifest for culture Neutral.
                        INFO: End assembly probing.
        ERROR: Cannot resolve reference Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed.
End Activation Context Generation.

I don’t understand most of that trace but I can see that it’s trying to find a bunch of resources named Microsoft.VC90.CRT.* and a search of my system suggests they are missing. Microsoft VC sounds like Visual C++ and v9 would be Visual Studio 2008. Checking back at the original developer’s website, I saw that he suggested to someone else experiencing problems that they might need the Microsoft Visual C++ 2008 redistributable package. I thought that the whole point of having the Microsoft .NET Framework on my PC was so that .NET applications would run, regardless of the language they were developed in (if there are any developers reading this, please feel free to leave a comment on this because I’m out of my depth at this point) but I downloaded the latest x64 version and installed it on my system.

No change (same error).

I realised that I was using the latest (SP1) version (v9.0.30729.17) and perhaps I needed the original one (v9.0.21022) as that’s the version number in the systrace log. So I removed the SP1 version and installed the original redistributable package instead.

Still no change.

I had the C++ source code, so I considered recompiling the application but I found that there was no compiler on my system (unlike for C#) and so I needed to install one of the Visual Studio Express Editions and would take a while. So I thought about other options.

It turned out that, even though I was running on 64-bit Windows, I needed to install a 32-bit redistributable. Don’t ask me why (that’s another developer question – the references to GAC_32 and Win32 in the sxstrace probably provide a clue) but it worked – and it didn’t matter whether I used the original or the SP1 version of the Microsoft Visual C++ 2008 redistributable package (so I used SP1).

Now the application runs as expected. It’s got me thinking though… I really should learn something about .NET development!

2 thoughts on “Incorrect side-by-side configuration caused by missing runtime libraries


  1. I can’t start PhotoShopElements 6.0 because of the following error.
    “C:Program Files\Adobe\Photoshop Elements 6.0\Photoshop Elements 6.0.exe
    The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail.”
    I have uninstalled PSE6 and reinstalled several times with the same result. I have PSE5 working correctly now, but I also removed it and installed PSE6 with same error message resulting.
    Can You Help?
    Cal Reed

Leave a Reply