Skip to content
Back to skills

Ilspy Decompile

ASecurity

Understand implementation details of .NET code by decompiling assemblies. Use when you want to see how a .NET API works internally, inspect NuGet package source, view framework implementation, or understand compiled .NET binaries.

  • 1,155 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 6, 2026
toolsbashapi

Works with

  • api

Security analysis

A100/100

Scanned September 6, 2026

npx -y skills add Aaronontheweb/dotnet-skills --skill ilspy-decompile --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ilspy Decompile?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ilspy Decompile
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aaronontheweb-ilspy-decompile/badge)](https://www.skillsdirectory.com/skills/aaronontheweb-ilspy-decompile)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ilspy-decompile
description: Understand implementation details of .NET code by decompiling assemblies. Use when you want to see how a .NET API works internally, inspect NuGet package source, view framework implementation, or understand compiled .NET binaries.
allowed-tools: Bash(dnx:*)
---

# .NET Assembly Decompilation with ILSpy

Use this skill to understand how .NET code works internally by decompiling compiled assemblies.

## Prerequisites

- .NET SDK installed
- ILSpy command-line tool available via one of the following:
  - `dnx ilspycmd` (if available in your SDK or runtime)
  - `dotnet tool install --global ilspycmd`

Both forms are shown below. Use the one that works in your environment.

> Note: ILSpyCmd options may vary slightly by version.  
> Always verify supported flags with `ilspycmd -h`.

## Quick start

```bash
# Decompile an assembly to stdout
ilspycmd MyLibrary.dll
# or
dnx ilspycmd MyLibrary.dll

# Decompile to an output folder
ilspycmd -o output-folder MyLibrary.dll
```

## Common .NET Assembly Locations

### NuGet packages

```bash
~/.nuget/packages/<package-name>/<version>/lib/<tfm>/
```

### .NET runtime libraries

```bash
dotnet --list-runtimes
```

### .NET SDK reference assemblies

```bash
dotnet --list-sdks
```

> Reference assemblies do not contain implementations.

### Project build output

```bash
./bin/Debug/net8.0/<AssemblyName>.dll
./bin/Release/net8.0/publish/<AssemblyName>.dll
```

## Core workflow

1. Identify what you want to understand
2. Locate the assembly
3. List types
4. Decompile the target

## Commands

### Basic decompilation

```bash
ilspycmd MyLibrary.dll
ilspycmd -o ./decompiled MyLibrary.dll
ilspycmd -p -o ./project MyLibrary.dll
```

### Targeted decompilation

```bash
ilspycmd -t Namespace.ClassName MyLibrary.dll
ilspycmd -lv CSharp12_0 MyLibrary.dll
```

### View IL code

```bash
ilspycmd -il MyLibrary.dll
```

## Notes on modern .NET builds

- ReadyToRun images may reduce readability
- Trimmed or AOT builds may omit code
- Prefer non-trimmed builds

## Legal note

Decompiling assemblies may be subject to license restrictions.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.