Start with the release, not the EXE
Imagine a desktop product with a familiar project layout. The executable starts the application, but most of the valuable implementation lives elsewhere.
Product.exe Product.UI.dll Product.Licensing.dll Product.Core.dll Product.Data.dll
Protecting only Product.exe leaves the implementation in the other shipped DLLs comparatively exposed. At the other extreme, applying identical renaming rules to every assembly without understanding how names are used can break loading, serialization, plugin integration, or WPF resources.
The useful unit of planning is therefore the release set: all the first-party binaries that work together in the customer environment.
Draw the dependency map
Before configuring protection, record which projects reference which others. A simplified dependency chain might look like this:
This is an example, not a universal order. If your UI depends on Core but Licensing is independent, the actual graph should reflect that. The general rule is to process lower-level dependencies before the assemblies that consume them, with the application executable near the end.
Choose protection by assembly role
| Assembly role | Typical policy | Check before release |
|---|---|---|
| Data access | Protect proprietary queries, mapping, and implementation details. | Connection setup and persistence operations still work. |
| Core / domain | Protect business logic; review shared types and public members. | Consumers resolve the expected types and members. |
| Licensing | Give sensitive checks and embedded strings particular attention. | Activation, renewal, and offline scenarios work. |
| UI / WPF | Protect implementation while checking XAML and resource references. | Windows, templates, and merged dictionaries load correctly. |
| Executable | Protect startup and composition code after its dependencies are ready. | The deployed application starts without relying on build-machine files. |
| Third-party or framework DLL | Normally do not rewrite binaries you do not own. | Dependencies are included in the package as intended. |
A separate contracts assembly deserves its own decision. If its types are consumed only by your own application and all related binaries are processed consistently, more renaming may be possible. If another product, plugin, script, or process depends on its public names, preserve that external contract.
Names are part of the runtime interface
Obfuscation can rename a member safely only when the application does not depend on its original name at runtime. Ordinary compiled calls are different from code that searches by a string.
// Name-based lookup: the literal is a compatibility dependency
var method = typeof(LicenseService).GetMethod("ValidateKey");
// A string-based type lookup has the same concern
var type = Type.GetType("Product.Core.PluginHost");
Search the solution for calls such as GetMethod, GetProperty, GetType, and Activator.CreateInstance. Also inspect dependency-injection registrations, plugin discovery, serializers, and any code that stores type or member names in configuration.
A practical boundary rule
- Private implementation: generally a good candidate for renaming.
- Internal-only public members: may be renamed when all dependent assemblies and settings are coordinated.
- External API, plugin contract, or string-based lookup: keep the required names stable or explicitly exclude the affected members.
Do not overlook DTOs and serialized names
A data-transfer object can be shared by several projects and still cross a boundary that is invisible in the project-reference diagram. JSON or XML payloads, saved configuration, IPC messages, and plugin interfaces may depend on names that look like ordinary implementation details.
public class LicenseRequest
{
public string CustomerId { get; set; }
public string ProductKey { get; set; }
}
If a serializer emits property names derived from the CLR members, renaming those members can change the wire format. Keep serialization contracts explicit where possible, and exclude the types or members whose names must remain stable rather than disabling protection for an entire assembly without need.
Make the build repeatable
Use an independent Skater settings profile or settings file for each assembly. This keeps exclusions and protection choices close to the project they govern, makes changes reviewable, and avoids accidentally applying a UI-specific policy to the licensing library.
- Build the Release configuration. Start from a clean, known set of compiled binaries.
- Prepare per-assembly settings. Configure renaming and other protection options, including exclusions for public contracts and name-based lookups.
- Run protection in dependency order. Use a batch script or build pipeline that invokes the command-line tool for each target in the chosen sequence.
- Prevent concurrent access to files being rewritten. If post-build protection operates on project outputs in place, avoid parallel build activity that could load or overwrite the same DLL at the same time.
- Keep logs and settings with the release record. They help reproduce the build and investigate runtime issues later.
The following is a structural example of an ordered Windows batch file. Adjust executable paths, target paths, and command-line switches to match the Skater version and settings used in your environment.
@echo off set SKATER="C:\Path\To\Skater\Skater.exe" set OUT=bin\Release rem Process lower-level dependencies first. %SKATER% [settings and input/output arguments for Product.Data.dll] if errorlevel 1 exit /b 1 %SKATER% [settings and input/output arguments for Product.Core.dll] if errorlevel 1 exit /b 1 %SKATER% [settings and input/output arguments for Product.Licensing.dll] if errorlevel 1 exit /b 1 %SKATER% [settings and input/output arguments for Product.UI.dll] if errorlevel 1 exit /b 1 rem Protect the executable after its dependencies. %SKATER% [settings and input/output arguments for Product.exe] if errorlevel 1 exit /b 1 echo Protection sequence completed.
WPF applications need a resource check
In WPF solutions, some of the application’s runtime connections are represented in XAML/BAML and resource dictionaries. If views, controls, or dictionaries are distributed across multiple assemblies, include each relevant assembly in your test plan. A window opening successfully is not enough if a less common template or merged dictionary is loaded only later.
Validate the protected set as a unit
Testing the executable beside a mixture of protected and original DLLs can hide deployment mistakes. Validate the exact output directory that will be packaged.
- Confirm every intended first-party assembly has a corresponding successful protection log.
- Run unit and integration tests against the complete protected output.
- Exercise licensing, data access, plugin loading, serialization, and important UI paths.
- Check that the installer or publish process collects the protected files, not stale build outputs.
- Install the package on a clean test machine and launch it without the source tree or development environment.
- Keep build logs and any mapping information needed for support and debugging.
Diagnose failures by their symptoms
| Symptom | Likely area to inspect | Next step |
|---|---|---|
| File locked during protection | Parallel build or another process using the output DLL | Serialize the build/protection steps and avoid rewriting a file while it is in use. |
MissingMethodException | Member renamed on one side, or a name-based lookup | Compare settings across the related assemblies and review exclusions. |
| JSON/XML data no longer matches | Serialized type or property names changed | Stabilize the contract names or configure explicit serialization names. |
| Plugin cannot locate a type | External contract renamed | Preserve the names the plugin expects. |
| Installer behaves differently from local tests | Unprotected or stale DLL included in the package | Rebuild the package from the validated protected output directory. |
| WPF view or resource fails to load | Cross-assembly XAML/BAML or resource reference | Check all assemblies that supply the relevant views and dictionaries. |
Frequently asked questions
Is protecting the EXE alone sufficient?
Only if the other shipped assemblies contain no implementation you need to protect. In a typical multi-project product, review each first-party DLL rather than assuming the executable contains the whole application.
Can every assembly use the same settings?
A shared baseline may be useful, but exclusions and name-preservation requirements often differ by role. Review each assembly separately and maintain its settings under source control.
Can I rename public members in my own libraries?
Often yes when all consumers are part of the same coordinated release. Preserve names required by external consumers, reflection, serializers, or plugins.
Should I protect shared contracts projects?
Protect private implementation where it exists. Keep public contract names stable when another process, plugin, or external client relies on them.
How should I test the final package?
Run the complete protected application from the exact files intended for distribution, then install it on a clean machine and exercise critical workflows.
Further reading
Use the Skater documentation for the command-line syntax and configuration options supported by your installed version.