clr-activation-debugging
Diagnoses .NET Framework CLR activation issues using CLR activation logs (CLRLoad logs) produced by mscoree.dll. Use when: the shim picks the wrong runtime, fails to load any runtime, shows unexpected .NET 3.5 Feature-on-Demand (FOD) dialogs, unexpectedly does NOT show FOD dialogs, loads both v2 and v4 into the same process causing failures, or any time someone is wondering "what is happening with .NET Framework activation?"
npx skills add dotnet/skills --skill clr-activation-debugging --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Diagnoses .NET Framework CLR activation issues by analyzing CLR activation logs (CLRLoad logs) produced by the shim (mscoree.dll). These logs record every decision the shim makes when selecting and loading a CLR version.
How it works
- When to use: apply to cases where the process cannot load a CLR, the shim selects the wrong CLR (e.g., v2.0 vs v4.0), unexpected or missing .NET 3.5 FOD dialogs, or when activation questions arise about the runtime.
- Prerequisites: CLR activation logging must be enabled to produce log files via environment variable or registry settings, with logs named "{ProcessName}.CLRLoad{NN}.log" and only readable after process exit.
- Inputs: CLR activation log files, symptom description, and expected behavior.
- Workflow:
- Load reference material (log format, activation flow, COM activation).
- Survey log files by grouping per process, identify outcomes like "Decided on runtime: vX.Y.Z", "ERROR:", "Launching feature-on-demand", or "Could have launched feature-on-demand".
- Analyze problematic logs tracing entry points (e.g.,
_CorExeMain,DllGetClassObject. Clsid: {guid},ClrCreateInstance,CorBindToRuntimeEx,ICLRMetaHostPolicy::GetRequestedRuntime,LoadLibraryShim). - Inspect input parameters such as
IsLegacyBind,IsCapped,SkuCheckFlags,ShouldEmulateExeLaunch, andLegacyBindRequired. - Process config file results, noting presence/absence and effects like
UseLegacyV2RuntimeActivationPolicy. - Review version resolution outputs (e.g.,
Installed Runtime: vX.Y.Z,Decided on runtime: vX.Y.Z). - If failure, follow the path showing FOD behavior and SEM_FAILCRITICALERRORS state to determine whether FOD was shown or suppressed.
- For multiple activations in one process, understand sequence patterns (e.g., first activation succeeds, subsequent fails under legacy cap).
- Optional system checks for CLSID registrations, installed runtimes, and SEM_FAILCRITICALERRORS inheritance.
- Output: A diagnosis describing what happened, why it happened, which inputs controlled the behavior, and what changed if applicable.
When to use it
- When a process fails to load the CLR, the shim selects the wrong CLR, FOD dialogs appear unexpectedly or not at all, multiple runtimes load in one process, or a COM object fails to activate due to shim runtime resolution.
What it can touch
- Logs and references described in the workflow; explicit commands and file names are used as written in the logs and steps (e.g.,
CLRLoadlogs,fondue.exe,fondue.exe /enable-feature:NetFx3,fuslogvw.exe).
Caveats
- Modern .NET (CoreCLR / .NET 5+) are not covered by this skill.
- Runtime crashes after the CLR has loaded are outside activation troubleshooting.
- Logs must be read after the process exits; the log file is held open during runtime. Logs directory must exist; the shim will not create it.
# CLR Activation Debugging Diagnose .NET Framework runtime activation issues by analyzing CLR activation logs (CLRLoad logs) produced by the shim (mscoree.dll). These logs record every decision the shim makes when selecting and loading a CLR version. ## When to Use - A process fails to load the CLR at all ("Unable to find a version of the runtime to use") - The shim picks the wrong CLR version (e.g., v2.0 instead of v4.0) - Unexpected .NET 3.5 Feature-on-Demand (FOD) install dialogs appear - FOD dialogs are expected but do NOT appear - Both CLR v2 and CLR v4 load into the same process, causing failures - A COM object fails to activate because the shim can't resolve the runtime - Legacy hosting APIs (CorBindToRuntime) bind to an unexpected version ## When Not to Use - **Modern .NET (CoreCLR / .NET 5+)** — this skill covers .NET Framework only (the mscoree.dll shim) - **Assembly binding failures** — use Fusion logs (fuslogvw.exe), not CLR activation logs - **Runtime crashes after the CLR has loaded** — activation succeeded; the problem is elsewhere ## Background ### The Shim Architecture The .NET Framework shim has two layers: - **mscoree.dll** (the "shell shim") — the public-facing
- When to Use
- When Not to Use
- Background
- The Shim Architecture
- .NET 3.5 / v2.0.50727 Version Mapping
- .NET 3.5 Availability on Recent Windows
- Shim HRESULT Codes
- Prerequisites
- Inputs
- Workflow
- Step 1: Load Reference Material
- Step 2: Survey the Log Files
- Step 3: Analyze Problematic Logs
- Step 4: Check System State (if needed)
What does the clr-activation-debugging skill do?
Diagnoses .NET Framework CLR activation issues using CLR activation logs (CLRLoad logs) produced by mscoree.dll. Use when: the shim picks the wrong runtime, fails to load any runtime, shows unexpected .NET 3.5 Feature-on-Demand (FOD) dialogs, unexpectedly does NOT show FOD dialogs, loads both v2 and v4 into the same process causing failures, or any time someone is wondering "what is happening with .NET Framework activation?"
How do I install it?
Run `npx skills add dotnet/skills --skill clr-activation-debugging --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
