Make your logic harder to follow
Apply renaming, string encryption and control flow obfuscation to make the intent of your code harder to read from distributed assemblies.
Combine renaming, string encryption, and method virtualization to suit your project. Reuse the same settings in CLI builds.
No subscription · Buy onceView code exclusion examplesWindows x64 · Desktop UI and CLI
Set exclusions for frequently called methods and fields whose names must stay unchanged. See how with C# and VB.NET examples.
Managed .NET DLLs and EXEs built from C#, VB.NET and other .NET languages retain IL and metadata. A decompiler can use them to reconstruct readable calculations and strings. The example below shows how method virtualization and string encryption change that view.
The example's discount and shipping calculations and message strings are visible.
In the same example, the calculation becomes a VM call and the message strings become protected read calls.
internal static class PriceCalculator
{
internal static int CalculateTotal(
int unitPrice,
int quantity,
bool isMember)
{
int subtotal =
unitPrice * quantity;
int discount = isMember
? subtotal / 5
: subtotal / 20;
int shipping = subtotal >= 50000
? 0 : 3000;
return subtotal - discount
+ shipping;
}
internal static string DescribeDiscount(bool isMember)
{
string discountMessage = isMember
? "Member discount: 20%"
: "Standard discount: 5%";
return discountMessage;
}
}Friend NotInheritable Class PriceCalculator
Friend Shared Function CalculateTotal(
unitPrice As Integer,
quantity As Integer,
isMember As Boolean
) As Integer
Dim subtotal As Integer = unitPrice * quantity
Dim discount As Integer = If(isMember,
subtotal \ 5, subtotal \ 20)
Dim shipping As Integer = If(subtotal >= 50000, 0, 3000)
Return subtotal - discount + shipping
End Function
Friend Shared Function DescribeDiscount(
isMember As Boolean
) As String
Dim discountMessage As String = If(isMember,
"Member discount: 20%", "Standard discount: 5%")
Return discountMessage
End Function
End ClassString encryption protects the values assigned to a variable, not its name. The method that returns the discount message is excluded from VM protection so you can see the change to its strings.


Make your logic harder to inspect, check that your app still works, and carry your settings into the next build.
Apply renaming, string encryption and control flow obfuscation to make the intent of your code harder to read from distributed assemblies.
Preview your deployment files and use name mappings to restore readable names in obfuscated stack traces. Keep the mapping for each build you release.
Save your desktop settings in a project and reuse it from the CLI. Add protection to your build process without selecting every option again.
Apply method protection to important calculations and encryption to strings and resources. For frequently executed code, compare its speed with the original and adjust the protection you apply.
Supported methods become separate instructions executed by the protection runtime. Apply this to important calculations and test performance in frequently run code.
View setup guideChange eligible type and member names and method branch flow. Check behavior before and after protection where reflection or serialization depends on names.
View setup guideProtect eligible string literals and resources embedded in the assembly. Check that the first screen, images and localized resources load correctly.
View setup guideChoose debugger detection and file integrity checks to fit your deployment and troubleshooting process.
View setup guideThe images are conceptual diagrams. Results vary by assembly and settings.
Exclude selected code where speed or compatibility matters, such as a hot loop or a field accessed by name. Add an Obfuscation attribute to its declaration while keeping protection enabled for the rest of the project.
Apply this to a field whose name is used by persisted data or reflection. Other eligible fields may still be renamed.
using System.Reflection;
internal sealed class AppState
{
[Obfuscation(Exclude = true, Feature = "renaming")]
private string persistedId = "";
private int workingCount;
}Imports System.Reflection
Friend NotInheritable Class AppState
<Obfuscation(Exclude:=True, Feature:="renaming")>
Private persistedId As String = ""
Private workingCount As Integer
End ClassUse this on a method where first-use string loading matters, such as a startup screen. Its string literals will not be encrypted by this option.
using System.Reflection;
[Obfuscation(Exclude = true, Feature = "strings")]
private static string StartupLabel() => "Ready";Imports System.Reflection
<Obfuscation(Exclude:=True, Feature:="strings")>
Private Shared Function StartupLabel() As String
Return "Ready"
End FunctionApply this to a frequently called calculation method, then compare behavior and execution time before and after protection.
using System.Reflection;
[Obfuscation(Exclude = true, Feature = "controlflow")]
private static int HotPath(int value) => value * 3;Imports System.Reflection
<Obfuscation(Exclude:=True, Feature:="controlflow")>
Private Shared Function HotPath(value As Integer) As Integer
Return value * 3
End FunctionExcluding only VM may leave body encryption or call hiding in place. Include the related features when a method needs ordinary IL.
using System.Reflection;
[Obfuscation(Exclude = true,
Feature = "ilcodehiding;virtualization;code;calls")]
private static int RenderLoopStep(int value)
=> value * 2;Imports System.Reflection
<Obfuscation(Exclude:=True,
Feature:="ilcodehiding;virtualization;code;calls")>
Private Shared Function RenderLoopStep(value As Integer) As Integer
Return value * 2
End FunctionThese examples control protection for selected code. App-wide options such as debugger detection and file integrity checks are configured in the project settings.
Read the exclusion and performance guideYour seven-day trial starts on first launch. Try it with your own assemblies, including on an offline PC.
Find the right steps for your first protected build, automation, or troubleshooting.
Use the seven-day trial to compare your protected app with the original and check how fast it runs. The Windows x64 installer includes the required .NET runtime.
The trial runs for 7 days from first launch. Protected files created with the trial run for 14 days after creation and are for evaluation, not customer distribution. For a production release, activate a paid license and protect the original build again.
v1.0.34 · SHA-256 eead066f08d9d9b629d0768b8d72e967183942f426566243d613296c47cc46e5
The distributed version of Confuser Studio exits at startup if a monitored decompiler or analysis tool is running. Apply “Exit when a monitored debugger runs” when protecting your own app, and it will also exit automatically when one of those tools is detected.
Once you’ve checked your app’s behavior and speed in the trial, continue your release work with a full license.
One license covers one PC and includes updates released during the first two years after purchase. After the update period ends, the last version you became eligible to use remains available on the same PC.