Symbol Renaming All Tiers
Symbol renaming is the foundation of .NET obfuscation. Demeanor replaces all type, method, field, property, event, and parameter names with short, meaningless identifiers. The IL remains structurally valid and executes identically — but decompilers produce unreadable output.
Usage
| CLI | MSBuild | Tier |
|---|---|---|
| (enabled by default) | (auto-enabled on Release) | Community+ |
--no-types | <DemeanorNoTypes>true</DemeanorNoTypes> | Disable type renaming |
--no-methods | <DemeanorNoMethods>true</DemeanorNoMethods> | Disable method renaming |
--no-fields | <DemeanorNoFields>true</DemeanorNoFields> | Disable field renaming |
--no-properties | <DemeanorNoProperties>true</DemeanorNoProperties> | Disable property renaming |
--no-events | <DemeanorNoEvents>true</DemeanorNoEvents> | Disable event renaming |
--no-parameters | <DemeanorNoParameters>true</DemeanorNoParameters> | Disable parameter renaming |
--names Unicode | <DemeanorNamingMode>Unicode</DemeanorNamingMode> | Enterprise |
Before & After
YOUR CODE
public class PricingEngine
{
private readonly decimal _basePrice;
private readonly string _currency;
private decimal _discount;
public decimal BasePrice => _basePrice;
public string Currency => _currency;
public void ApplyDiscount(DiscountType type, decimal amount) { ... }
public decimal CalculateTotal(int quantity, TaxRegion region) { ... }
public string FormatReceipt(int quantity, TaxRegion region) { ... }
}AFTER OBFUSCATION
public class f
{
private decimal m_a;
private string b;
private decimal c;
decimal a() => m_a;
string a() => b;
void a(g a, decimal a) { ... }
decimal a(int a, h a) { ... }
string a(int a, h a) { ... }
}Real ILSpy output from samples/DocSample. All type, method, field, and parameter names replaced with single-letter identifiers. Methods share the same name a wherever that’s safe. Property metadata stripped.
Naming Modes
Two naming modes are available:
- Alpha (default) — short, sequential identifiers (
a,b,c, ...). Produces the smallest possible names. - Unicode (Enterprise) — obscure glyphs that are valid identifiers to the CLR but cannot be typed in a source editor and render as visual noise in a decompiler.
When to Disable
- Reflection by name — code using
Type.GetMethod("MethodName")or data binding by property name will fail if those names are renamed. Use[Obfuscation(Exclude = true)]or--excludeto protect specific symbols. - Serialization —
JSON.NET,System.Text.Json,BinaryFormatter, and XML serialization resolve members by name. Use--no-serializableor attribute-level exclusions. - Public library API — public types and members are preserved by default in library DLLs. Use
--include-publicsonly for executables.
Ready to protect your .NET code?