decompile-dll

Decompile .NET DLL and EXE assemblies back to C# source using ilspycmd.

Updated Jul 24, 2026
One-click install
npx skills add https://github.com/gweone/agent-plugins --skill decompile-dll-gweone
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: decompile-dll
Source: https://github.com/gweone/agent-plugins/tree/main/plugin/sharpps-dotnet/skills/decompile-dll
Command: npx skills add https://github.com/gweone/agent-plugins --skill decompile-dll-gweone

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Inspecting the source code of compiled .NET assemblies shipped by NuGet-distributed products (like Sitecore) is difficult without the original source, and GUI decompilers like dotPeek or dnSpy only run on Windows desktops. This Skill provides a cross-platform CLI workflow to acquire the target DLL via NuGet restore and decompile it to readable C# on any OS. ## Core Features & Use Cases - NuGet-based DLL acquisition: Resolves and restores the target assembly via dotnet restore and the NuGet global-packages cache into a shared decompiler/{product}/{version}/bin/ layout, avoiding manual downloads and hardcoded paths. - Cross-platform decompilation: Uses ilspycmd (built on the ILSpy engine) to decompile both .NET Framework 2.0–4.8.x and .NET Core/5+ assemblies on Windows, Linux, or macOS, including headless and remote environments. - Flexible output modes: Dumps C# to stdout, generates a full compilable project directory with -p -o, extracts a single type with -t, or lists and extracts embedded resources including BAML-to-XAML conversion. - Use Case: You need to understand how Sitecore.Kernel.dll version 10.3.1 implements a pipeline while working on a Linux server. The Skill restores the package, populates the shared bin folder with dependencies, and decompiles the assembly into a browsable C# project. ## Quick Start Decompile the Sitecore.Kernel.dll assembly from Sitecore 10.3.1 into a C# project directory using ilspycmd.

Frequently Asked Questions about decompile-dll

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decompile a .NET DLL to C# from the command line?

Install ilspycmd as a dotnet global tool with `dotnet tool install -g ilspycmd`, then run `ilspycmd path/to/Assembly.dll` to dump C# to stdout, or add `-p -o outputdir -r binfolder` to generate a full compilable project with resolved references.

ilspycmd vs dotPeek: which .NET decompiler should I use?

dotPeek and dnSpy are Windows-only desktop GUI applications, while ilspycmd is a CLI built on the same ILSpy engine that runs on any OS with the .NET runtime. Use ilspycmd for headless, remote, Linux, macOS, or scripted CI workflows.

Can ilspycmd decompile both .NET Framework and .NET Core assemblies?

Yes, ilspycmd decompiles both .NET Framework 2.0–4.8.x and .NET Core/5+ assemblies. It reads CIL and metadata directly, so it does not matter which framework produced the assembly or which OS it runs on.

How do I get a product's DLL without downloading it manually?

Reference the assembly's NuGet package pinned to the product version in a project, run `dotnet restore`, then locate the package via `dotnet nuget locals global-packages --list` and copy the DLL from the cache into your shared bin folder.

Why are some type references unresolved after decompiling?

Unresolved references occur when dependency DLLs are missing from the folder passed via the `-r` flag. Restore and copy the missing dependency packages into the same shared bin directory, then re-run ilspycmd to resolve them.