Friday, August 31, 2012

Activation context generation failed for ...


One of my colleagues was getting the error.

Activation context generation failed for "…". Dependent Assembly Microsoft.VC80.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.6195" could not be found.

We thought installing Visual C++ 2005 Redistributable package on machine should resolve this problem so we installed the following packages on that machine:

But the problem still persisted after installing the above packages. Then we tried to generate the traces using the sxstrace.exe and found that reference was not getting resolved:
INFO: Parsing Manifest File “…”.
   INFO: Manifest Definition Identity is (null).
   INFO: Reference: Microsoft.VC80.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.6195"
INFO: Resolving reference Microsoft.VC80.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.6195".
   INFO: Resolving reference for ProcessorArchitecture amd64.
      INFO: Resolving reference for culture Neutral.
         INFO: Applying Binding Policy.
            INFO: Find publisher policy at C:\Windows\WinSxS\manifests\amd64_policy.8.0.microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_none_09bd9a47facfb1f8.manifest
            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_64\Microsoft.VC80.CRT\8.0.50727.6195__1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.DLL.
            INFO: Attempt to probe manifest at C:\PDFHotell\Microsoft.VC80.CRT.DLL.
            INFO: Attempt to probe manifest at C:\PDFHotell\Microsoft.VC80.CRT.MANIFEST.
            INFO: Attempt to probe manifest at C:\PDFHotell\Microsoft.VC80.CRT\Microsoft.VC80.CRT.DLL.
            INFO: Attempt to probe manifest at C:\PDFHotell\Microsoft.VC80.CRT\Microsoft.VC80.CRT.MANIFEST.
            INFO: Did not find manifest for culture Neutral.
            INFO: End assembly probing.
   ERROR: Cannot resolve reference Microsoft.VC80.CRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.6195".
ERROR: Activation Context generation failed.
End Activation Context Generation.
This issue gets resolved after the installation of KB2538242 which get installed as part of windows update.
Hope this would be helpful to others!!!
Cheers
Rohit Sharma