Manual Walkthrough

The same service, the same decision and the same result as the conversational walkthrough, from the command line. Every output below is what the command printed.

The /obfuscate walkthrough done by hand: the same service, the same one decision, the same result, from the command line and an editor. No assistant.

The project is CatalogService, a small ASP.NET Core service on .NET 11: Minimal API endpoints, an MVC health controller, EF Core, System.Text.Json with a source-generated context, Newtonsoft and a [Serializable] legacy DTO. Every command below was run in a fresh copy of it, and every output is what the command printed, with Demeanor 6.3.0 on .NET SDK 11.0.100.

You need Demeanor installed (dotnet tool install -g WiseOwl.Demeanor) and an Enterprise key in DEMEANOR_LICENSE. The getting-started walkthrough covers both.

1. Audit

Build Release, then ask Demeanor what it will do to the assembly before it does anything:

PS> dotnet build -c Release
  Determining projects to restore...
  Restored E:\CatalogService\CatalogService.csproj (in 702 ms).
  CatalogService -> E:\CatalogService\bin\Release\net11.0\CatalogService.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.94
PS> demeanor audit bin\Release\net11.0\CatalogService.dll
Demeanor for .NET. Version 6.3.0.0
Copyright (c) Wise Owl Software. 1999-2026. All Rights Reserved.

Audit: CatalogService (26 types)

DECISIONS (1)
Until you answer, these keep their names. Nothing breaks.

  CatalogService.Legacy.PluginHeartbeat
    Problem: Created with Activator.CreateInstance<T>(). Safe to rename unless the instance is then
             serialized, mapped by an ORM or filled in by a container, which read its property
             names.
    Fix:     If any of those happens to it, put
             [Obfuscation(Feature="rename", Exclude=true, ApplyToMembers=true)] on the type. If not,
             it is safe to rename.

WORTH KNOWING
Nothing here changes what obfuscation does.

  CatalogService.Legacy.LegacyPlugin.SerializeAuditRecord
    Problem: Serializes by reflection. Fine for this build; with Native AOT or trimming the compiler
             warns (IL2026, IL3050) and the trimmer can remove the properties, so the JSON comes out
             empty.
    Fix:     Serialize through a source-generated context: a partial JsonSerializerContext with
             [JsonSerializable(typeof(T))], passing its JsonTypeInfo<T>.

  Program (top-level statements)
    Problem: The handler's return value is written to the response as JSON by its property names.
             Renamed names would still return 200, with keys the client does not recognise.
    Fix:     Keep the type's names: [JsonSerializable(typeof(T))] on a JsonSerializerContext, or
             [Obfuscation(Feature="rename", Exclude=true, ApplyToMembers=true)]. The report says
             which are kept.

KEPT AUTOMATICALLY (12 patterns, nothing to do)

  EF Core DbContext: CatalogDbContext
  EF Core entities: Order, OrderItem, Product
  MVC controllers: HealthController
  Members looked up by name: Order, OrderItem, OrderSummary, Product
  Newtonsoft.Json: LegacyWebhookPayload
  Options binding: CatalogOptions
  Serializer attributes: LegacyWebhookPayload
  System.Text.Json: AuditRecord
  System.Text.Json source-generated context: Order, OrderItem, OrderSummary, Product
  [Serializable] types: LegacyReportDto

To rename one anyway, put [Obfuscation(Feature="rename", Exclude=false)] on the type.

SUMMARY
  Types:                           26
  Patterns handled automatically:  12
  Patterns needing your decision:  1 (1 symbol)

ANSWERING A DECISION
Each Fix line says what to put on the type. In general:
  It must keep its names:  [Obfuscation(Feature="rename", Exclude=true, ApplyToMembers=true)]
  It is safe to rename:    [Obfuscation(Feature="rename", Exclude=false)]
ObfuscationAttribute is in System.Reflection. Rebuild and audit again; the decision is gone, and
every build, CI included, does what the attribute says. For code you cannot edit,
<DemeanorExcludeSymbol> in the project file keeps a name.

One decision, two things worth knowing that change nothing for this build, and twelve patterns whose names Demeanor keeps without being asked.

2. Answer the decision

The audit's question is what happens to a PluginHeartbeat after Activator.CreateInstance makes it. In Legacy/LegacyPlugin.cs, PostHeartbeat fills in its three properties and passes it, as a plain object, to an IHeartbeatCollector that this assembly does not implement. Something outside the service reads it, and an untyped heartbeat is read by its property names. So the names stay, which is the attribute the finding names:

PS> git diff
diff --git a/Legacy/LegacyPlugin.cs b/Legacy/LegacyPlugin.cs
index 4fb25af..408b278 100644
--- a/Legacy/LegacyPlugin.cs
+++ b/Legacy/LegacyPlugin.cs
@@ -1,3 +1,4 @@
+using System.Reflection;
 using System.Text.Json;

 namespace CatalogService.Legacy;
@@ -29,6 +30,7 @@ public sealed record AuditRecord(
     DateTime OccurredAt,
     string Detail);

+[Obfuscation(Feature = "rename", Exclude = true, ApplyToMembers = true)]
 public sealed class PluginHeartbeat
 {
     public string PluginName { get; set; } = "";

Feature = "rename" matters: without it the attribute would also switch off string encryption, control-flow obfuscation and call hiding for the type, when all it needs is to keep its names.

Rebuild and audit again. The decision is gone:

PS> dotnet build -c Release
  Determining projects to restore...
  All projects are up-to-date for restore.
  CatalogService -> E:\CatalogService\bin\Release\net11.0\CatalogService.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.19
PS> demeanor audit bin\Release\net11.0\CatalogService.dll
...
SUMMARY
  Types:                           26
  Patterns handled automatically:  12
  Patterns needing your decision:  0

3. Obfuscate every Release build

demeanor init adds the build integration to the project file, pinned to the installed version:

PS> demeanor init
Demeanor for .NET. Version 6.3.0.0
Copyright (c) Wise Owl Software. 1999-2026. All Rights Reserved.

Demeanor Init
=============

Project: E:\CatalogService\CatalogService.csproj

Wrote MSBuild integration into the project.
Run `dotnet restore` to pull the WiseOwl.Demeanor.MSBuild package.
Set DEMEANOR_LICENSE in your environment, then run:
  dotnet build -c Release

CatalogService is an application: nothing compiles against it, so its public names are not a contract, and they can be renamed too. That is one property, added by hand beside the one init wrote:

PS> git diff CatalogService.csproj
diff --git a/CatalogService.csproj b/CatalogService.csproj
index 42d978b..e638cc1 100644
--- a/CatalogService.csproj
+++ b/CatalogService.csproj
@@ -9,4 +9,14 @@
     <PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="11.*" />
     <PackageReference Include="Newtonsoft.Json" Version="13.*" />
   </ItemGroup>
+
+  <!-- demeanor-init -->
+  <ItemGroup>
+    <PackageReference Include="WiseOwl.Demeanor.MSBuild" Version="6.3.0" />
+  </ItemGroup>
+  <PropertyGroup Condition="'$(Configuration)' == 'Release'">
+    <Obfuscate>true</Obfuscate>
+    <DemeanorIncludePublics>true</DemeanorIncludePublics>
+  </PropertyGroup>
+
 </Project>

From now on dotnet build -c Release obfuscates the assembly in place and writes the report beside it:

PS> dotnet build -c Release
  Determining projects to restore...
  Restored E:\CatalogService\CatalogService.csproj (in 159 ms).
  CatalogService -> E:\CatalogService\bin\Release\net11.0\CatalogService.dll
  Demeanor: obfuscating E:\CatalogService\bin\Release\net11.0\CatalogService.dll

  Obfuscation complete.
    Assemblies processed:    1
    Types renamed:           19 of 30 (63%)
    Methods renamed:         144 of 265 (54%)
    Fields renamed:          125 of 159 (78%)
    Properties renamed:      13 of 56 (23%)
    Parameters renamed:      135 of 207 (65%)
    Call sites proxied:      7 of 7 (100%)
    Strings encrypted:       86
    Constants encrypted:     51
    Resource encryption:     no embedded resources
    Methods CFG-obfuscated:  101 of 250 (40%)
    Anti-tamper:             injected in 1 of 1 assemblies
    Anti-debug:              checks in 49 methods
    Enum member deletion:    none deleted
    Hinder reflection:       1 of 1 assemblies

  Automatic decisions:
     [FrameworkPatternAutoProtected] Preserved 1 anonymous-type (and members)
     [FrameworkPatternAutoProtected] Preserved 1 [Serializable]-marked types (and members)
     [FrameworkPatternAutoProtected] Preserved 1 MVC controllers (and members)
     [FrameworkPatternAutoProtected] Preserved 1 EF Core DbContext types (and members)
     [FrameworkPatternAutoProtected] Preserved 3 EF Core entity types (and members)
     [FrameworkPatternAutoProtected] Preserved 1 IOptions binding targets (and members)
     [FrameworkPatternAutoProtected] Preserved 1 system-text-json (and members)
     [FrameworkPatternAutoProtected] Preserved 1 Newtonsoft.Json-serialized types (and members)
     [CustomAttributeBlobRewritten] Rewrote 2 custom-attribute blob(s) so typeof()/enum-typed arguments track renamed types
    (use --verbose to see reasons + affected symbols, or --report for full JSON)

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.92

Debug builds are left alone. On a build server, the only addition is the key: DEMEANOR_LICENSE as a secret. dotnet restore fetches the package.

4. Check the result

PS> demeanor check bin\Release\net11.0\CatalogService.dll
Demeanor for .NET. Version 6.3.0.0
Copyright (c) Wise Owl Software. 1999-2026. All Rights Reserved.

Obfuscation check: CatalogService
  Demeanor watermark: YES (Enterprise tier)
  String encryption: YES
  Anti-tamper: YES
  Anti-debug: YES
  SuppressIldasm: YES

Verdict: OBFUSCATED

Keep bin\Release\net11.0\CatalogServiceReport.json with each release. It maps the new names back to the old ones, which is what demeanor deobfuscate needs to turn a stack trace from this build back into your names.