Include Publics Enterprise
By default, Demeanor preserves public and protected types and members because library DLLs may be referenced by external code. For executables and assemblies that are not referenced by other projects, --include-publics tells Demeanor to obfuscate everything — achieving maximum protection.
Usage
| CLI | MSBuild | Default |
|---|---|---|
--include-publics | <ObfuscateIncludePublics>true</ObfuscateIncludePublics> | Off |
Before & After
WITHOUT --include-publics
public class PricingEngine
{
private decimal a; // renamed
private string b; // renamed
public decimal BasePrice => a; // preserved
public string Currency => b; // preserved
public void ApplyDiscount(...) // preserved
public decimal CalculateTotal(...) // preserved
}WITH --include-publics
public class f
{
private decimal m_a;
private string b;
decimal a() => m_a;
string a() => b;
void a(g a, decimal a) { ... }
decimal a(int a, h a) { ... }
}Without --include-publics, public types and members keep their original names (safe for libraries). With it, everything is renamed — 85%+ of types, 90%+ of methods.
When to Use
- Executables (
.exe) — no external code references your public API. - Self-contained applications — all assemblies deploy together and are not used as libraries.
When NOT to Use
- Class libraries referenced by other projects — renaming the public API breaks all consumers.
- Plugin assemblies loaded by name — the host expects specific type/method names.
Ready to protect your .NET code?