# Obfuscate .NET Applications in Azure DevOps Pipelines

Use the two official .NET Reactor extensions:

The Marketplace pages provide pipeline 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. Install both Marketplace extensions in your Azure DevOps organization. Add .NET Reactor Tool Installer before the build. For licensed users, supply your license as shown on the Tool Installer page.
  2. Build or publish your application as usual.
  3. Add .NET Reactor Task after the build or publish step. Select your saved .nrproj file using reactorProjectFilePath. For licensed users, include -licensed in additionalArguments.

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 Tool Installer and setting -licensed in the protection task 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 protection task 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 Azure DevOps Pipelines.

In this case, install and use only .NET Reactor Tool Installer before your build or publish step. Configure the license through the Tool Installer as usual. Do not add the separate .NET Reactor protection task: 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 pipeline. 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 Tool Installer.

# Use UTF-8 for Git

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

# 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 · GitHub Actions · Command-line parameters