Plugins and add-ins

Your product is a DLL that someone else's application loads — on the customer's own machine.

The situation

A plugin is a library with one unusual consumer: a host application that finds your entry point by name or by attribute, loads your assembly into its own process, and calls into it. AutoCAD and Revit add-ins, Office and VSTO extensions, editor extensions and MMC-style snap-ins all work this way.

Plugin vendors are usually small teams selling specialised logic — an engineering calculation, an estimating rule set, a file converter — to a niche audience. The whole product sits in one or two assemblies on the customer's disk, and a decompiler reads it like source.

What you are exposed to

  • A customer or reseller decompiling the add-in to copy the calculation that is your product.
  • A competitor in the same niche studying how you drive the host's API.
  • Licence and seat checks being found by name and patched out.
  • Readable strings exposing licence server addresses, registry paths and feature flags.

What obfuscation does here

  • A plugin is a library, so its public surface — the command and application classes the host looks for — is preserved automatically. The host still finds and loads it.
  • Everything behind those entry points is renamed: the private and internal classes that hold the actual engineering logic.
  • Where a host finds something non-public by name, you keep just that name with the standard [Obfuscation(Exclude = true)] attribute rather than weakening the whole assembly.
  • On Pro, string encryption hides the licence and server strings, control-flow obfuscation tangles the calculation itself, and virtualization can cover the one licence-check method that matters most.

What it does not do

Worth being clear about the limits before you rely on this.
  • Your entry-point classes and their public members stay readable — the host needs them, so a reader knows where execution starts.
  • Calls into the host's API cannot be renamed, so a reader still sees which host features you use. Reference proxying on Pro hides static calls at the call site, not the fact that the host API exists.
  • The add-in runs inside the customer's process, where a debugger can be attached. Obfuscation raises the cost of reading it; it does not prevent tracing.
  • Some hosts require signed add-ins. Sign after obfuscating, never before.

Suggested setup

Plan Free covers renaming for an add-in under 1 MB. Pro adds string encryption, control-flow and virtualization, and batches a multi-assembly plugin in one pass.
Public names Not applicable — an add-in is a library, so its public surface is preserved for the host.
Workflow Build in Release, obfuscate the add-in assembly, sign it if the host requires that, then build the installer or bundle from the protected file.

Test this before you ship

Obfuscation only breaks things that resolve a name at runtime, so a short checklist catches nearly everything:

  • The host application loads the add-in without a load error.
  • Every command or ribbon button the add-in registers appears and runs.
  • Settings and saved documents from the previous version still open.
  • The licence or activation flow completes on a clean machine.
  • The add-in works in each host version you claim to support.

If something does break, obfuscation and reflection lists each cause with its fix.

Try it on your own build

Upload a DLL or EXE and compare the two in a decompiler. It takes about a minute.