Since I published my article on how to diagnose SideBySide failures, I have received many feedbacks that since Sxstrace is not available in Windows XP/Windows Server 2003, it is hard to figure out what is wrong in Windows XP/Windows Server 2003.
This article intends to help people diagnose SideBySide failures in Windows XP/Windows Server 2003.
SideBySide failures usually results in error code Win32 error ERROR_SXS_CANT_GEN_ACTCTX (or HRESULT 0x800736B1), or ntstatus code STATUS_SXS_CANT_GEN_ACTCTX (0xc0150002). You may see it when launching a process with Sxs manifest, or loading a dll with sxs manifest.
From this article, we learned that the real work is done by CSRSS.exe.
Since most of the work in Creating Activation Context is probing, we can use the sysinternals tool FileMon.exe to understand what is going on.
Let's run an example.
I am running on Windows Server 2003.
Microsoft Windows [Version 5.2.3790]
There is a tool CoCreate.exe. It has a Sxs manifest depends on common control.
F:\tools>more cocreate.exe.manifest<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity name="CoCreate" version="18.104.22.168" />
<dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="22.214.171.124" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency>
Unfortunately it says it depends on common control version 126.96.36.199, which does not exist anywhere currently.
Let's run the tool anyway.
F:\tools>cocreateThe system cannot execute the specified program.
Just as expected, the tool refuses to run.
Let's look at what event log tells us.
The message is accurate. But it is not really helpful here. What referenced assembly is not installed on my system?
Let's see if Filemon can help us here or not.
Launch filemon, and set the filter to CSRSS, as we want to monitor file access from the process CSRSS.exe.
Re-run CoCreate.exe. Now we have this in FileMon:
Ok. CSRSS.exe did a lot probing for Microsoft.Windows.Common-Controls_6595b64144ccf1df_188.8.131.52.xxx. Given that CoCreate.exe.manifest says it depends on common control version 184.108.40.206, it is pretty clear that the missing referenced assembly is common control version 220.127.116.11.
Warning!!! Please do not attempt to copy files to the Winsxs directories shown in filemon output to workaround the Sxs activation context creation problem. Sxs keeps other metadata about the assembly besides the files in %windir%\Winsxs. Please always use the documented way to install Sxs assemblies.