Demeanor for .NET Documentation
Two ways to get started: let Claude handle everything, or configure manually via CLI.
Getting Started with Claude RECOMMENDED
The fastest path. Claude acts as a senior .NET security consultant — it audits your assemblies, identifies every risk, configures maximum-strength protection, and writes your CI/CD build config. You make the decisions; Claude does the work.
Install Demeanor (one command)
dotnet tool install -g WiseOwl.Demeanor One Native AOT global tool package, two binaries on PATH: demeanor and inspect. On first invocation demeanor auto-installs the /obfuscate skill into ~/.claude/skills/obfuscate/ and registers itself as an MCP server in ~/.claude.json. Skip with DEMEANOR_NO_BOOTSTRAP=1 if needed.
Set your Enterprise license key
# In your shell profile or CI secrets:
export DEMEANOR_LICENSE="your-enterprise-key" Enterprise license required for the AI-assisted workflow. Get one here. Community tier (free) works for basic renaming without AI.
Open your project in Claude Code and type /obfuscate
Claude follows a 6-phase workflow:
- Audit — scans your assemblies for 20 framework patterns that break after obfuscation
- Configure — builds exclusion rules from your decisions
- Dry Run — full simulation, shows what would change, you approve
- Obfuscate — applies all protection: renaming, encryption, CFG, anti-tamper
- Verify — compares output, queries the report, helps you test
- CI/CD — writes MSBuild config so every Release build is obfuscated automatically
After Phase 6, your CI/CD pipeline runs obfuscation unattended on every Release build. No ongoing AI dependency.
Getting Started with CLI
For developers who prefer manual control, or if you're using Community (free) tier.
Install the CLI tool
dotnet tool install -g WiseOwl.Demeanor One-time setup. Puts demeanor on your PATH across Windows, Linux, and Mac.
Audit your assembly (Enterprise)
demeanor audit bin/Release/net10.0/MyApp.dll Pre-obfuscation risk analysis. Detects 20 framework patterns and tells you exactly what to exclude and why. Add --json for structured output.
Wire MSBuild integration
demeanor init Finds the nearest .csproj and appends a small MSBuild target that calls demeanor after every Release build. Idempotent — safe to run again. No NuGet package is added.
Build
dotnet build -c Release Your Release output is now obfuscated. Every subsequent Release build is too.
Verify and debug
# Check if an assembly is obfuscated
demeanor check bin/Release/net10.0/MyApp.dll
# Inspect the obfuscated output (standalone tool, no license required)
inspect bin/Release/net10.0/MyApp.dll
# Deobfuscate a crash stack trace
demeanor deobfuscate crash.txt --report report.json How Demeanor responds to risky patterns
When the IL analyzers find a construct that wouldn’t survive renaming, Demeanor takes one of two actions:
1. Auto-suppression (no action required)
For patterns where the exact names that must be preserved can be derived from the IL, Demeanor automatically excludes those symbols from renaming. You don’t need to do anything.
ReflectionAnalyzer—Type.GetType("X"),typeof(T).GetMethod("Name"),JsonSerializer.Serialize<T>(freezes T’s properties), ASP.NETWriteAsJsonAsync<T>, DLRdynamicbindersPropertyUsageAnalyzer— JSON DTOs,[JsonSerializable]source-gen, Blazor[Parameter]/[Inject], WPFINotifyPropertyChanged, WCF[DataContract], XML serialization, COM interopExclusionEngine— entry points (Main), runtime-critical members, serializable fields, public/protected library symbols
These show up in the audit report as auto-detected. The recommendation says “No action needed.”
2. Advisory — Demeanor recommends a source change
For patterns where Demeanor can observe the risk but not safely decide which symbols to freeze, it emits an advisory and does not change rename output. You decide: add an annotation, add an exclusion, or rewrite the construct.
MinimalApiScanner—MapGet/MapPosthandler return types whose properties aren’t protected. Recommendation: add[JsonSerializable(typeof(YourDto))].AotJsonAnalyzer— reflection-pathJsonSerializer.Serialize<T>/Deserialize<T>calls and non-genericJsonStringEnumConverterctor uses. Recommendation: migrate to a source-generatedJsonSerializerContext; replace withJsonStringEnumConverter<TEnum>. Surfaces unconditionally even for libraries that never AOT-publish.- Audit heuristics —
SignalR Hub, MVCController, EF CoreDbContext,IOptions<T>, MEF, gRPC, WPF/XAML BAML. Recommendation: add the suggested--exclude/--xrrule or[Obfuscation].
Each finding carries a Classification:
auto-detected— handled automatically. No action.needs-exclusion— add--exclude,--xr, or[Obfuscation].needs-code-change— modify source (e.g. add[JsonSerializable], switch to source-gen).advisory— informational; may not need action.
Licensing Overview
Per-company licensing. No seat counting, no machine locking, no activation server. License keys are self-validating — they work completely offline.
- Community — Free. Symbol renaming, alpha naming, single assembly.
- Enterprise ($2,999/yr) — All encryption, CFG, proxy, AI-assisted workflow, multi-assembly, incremental, reports.
No license key is needed for Community tier. See full licensing details.
Reference
- AI-Assisted Obfuscation — The
/obfuscateworkflow, MCP tools, pattern detection - Options Reference — Detailed docs for every technique with before/after code examples
- CLI Reference — All obfuscate, inspect, audit, and license command options
- MSBuild Properties — Configure obfuscation in your .csproj
- Exclusions Guide — Protect types and members from renaming
- CI/CD Integration — GitHub Actions, Azure Pipelines, and more
- Licensing — Tiers, expiry, and verification
- Reports & Incremental — Obfuscation reports, exclusion diagnostics, incremental builds
- Metadata Inspector — Interactive REPL for exploring assembly metadata
- AI-Assisted Inspection — Connect the inspector to Claude Code via MCP
- Troubleshooting — Common issues and solutions
- Supported Platforms — .NET versions and OS support