Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ispras/casr/llms.txt
Use this file to discover all available pages before exploring further.
casr-csharp analyzes C# crash output — Unhandled exception. and Unhandled Exception: blocks emitted by the .NET runtime — and produces structured .casrep reports. It integrates with Sharpfuzz, the AFL++-based coverage fuzzer for .NET managed code, and is invoked automatically by casr-afl when a Sharpfuzz target is detected.
The target binary must be identified by a .dll, .exe, or .csproj file somewhere in the argument list — CASR uses this to set the executable_path in the report. Both the dotnet CLI and the mono runtime are supported as the process launcher.
Synopsis
-- separator is required. Everything after it is the command CASR will execute (e.g., dotnet run --project … or mono MyApp.exe).
Options
Path to save the
.casrep report file. If a directory is provided, the report filename is generated automatically from the crash context.Print the CASR report as JSON to stdout instead of writing it to a file. Mutually exclusive with
--output; exactly one of the two is required.Path to a file fed to the target program’s standard input. Use this when the fuzz harness reads the test case from stdin rather than a file argument.
Maximum number of seconds to wait for the target process to finish. A value of
0 disables the timeout entirely.Path to a file containing regular expressions for function names and file paths that should be excluded from stack trace analysis.
A path prefix removed from every file path in the stack trace and crash line. Also settable via
CASR_STRIP_PATH.Shared library paths injected via
LD_PRELOAD into the target process only. Space or colon delimited. Also settable via CASR_PRELOAD.dotnet vs mono
casr-csharp supports both .NET runtime launchers:
| Launcher | Example argument | Use case |
|---|---|---|
dotnet run | -- dotnet run --project MyApp.csproj | Build-and-run from source |
dotnet (pre-built) | -- dotnet run --no-build --project MyApp.csproj | Run pre-built project (recommended for Sharpfuzz with AFL++) |
mono | -- mono MyApp.exe | Mono runtime for .exe assemblies |
CASR validates that the argument list contains a
.dll, .exe, or .csproj file. If none is found, the tool exits with an error: dotnet/mono target is not specified by .dll, .exe or .csproj executable.Examples
Analyze adotnet run project crash:
Fuzzer integration
casr-csharp handles single-crash analysis. For bulk triage of Sharpfuzz + AFL++ crash directories, use casr-afl, which auto-detects Sharpfuzz targets and invokes casr-csharp for each crash input.
cmdline file, use --ignore-cmdline: