# Obfuscate .NET Applications in GitHub Actions with .NET Reactor

Use the two official .NET Reactor actions:

The Marketplace pages provide workflow examples and explain how to supply your .NET Reactor license. Start with those examples and adapt the application and project paths to your build.

# Getting started

For a project that does not already use the Build Integration Manager:

  1. Add .NET Reactor Install to your workflow before the build. For licensed users, supply your license as shown on the Install action page.
  2. Build or publish your application as usual.
  3. Add .NET Reactor Run after the build or publish step. Select your saved .nrproj file using project_file. For licensed users, include -licensed in additional_arguments.

Configure the .NET Reactor project to use the assemblies produced by this build and the desired protection settings.

# Licensed users: always use -licensed

Supplying your license to the Install action and setting -licensed in the Run action serve different purposes: the installer sets up the license, while the parameter checks that protection actually runs as a licensed full version.

As explained on the Run action page, -licensed stops protection with exit code 101 if .NET Reactor is not fully licensed. This prevents accidentally releasing demo-protected software, which stops working after 14 days. Fix the license setup rather than removing the parameter.

# Using the Build Integration Manager

The Build Integration Manager modifies your application project so that it calls .NET Reactor automatically during the build. These modified projects also work with GitHub Actions.

In this case, use only .NET Reactor Install before your build or publish step. Configure the license through the Install action as usual. Do not add .NET Reactor Run: the modified project already invokes .NET Reactor.

Commit the modified application project and its generated targets file, and make any referenced .nrproj file available to the workflow. Use the build configuration and build or publish command selected for integration.

For licensed users, add -licensed to the Command-line Parameters field in the Build Integration Manager. It belongs to the integrated .NET Reactor invocation, not to the build command or the Install action.

# Use UTF-8 for Git

In .NET Reactor, enable Help → Settings → UTF8 Format (Git Compatible) and save your .NET Reactor project files. Open and save existing files again to apply the format. This makes the files easier to display and compare in GitHub.

# Check the result

Use the files produced by .NET Reactor for packaging and deployment. Inspect and test the final application as described in Verify Protected Output.

# Related topics

Build Integration Manager · Azure DevOps · Command-line parameters