The .NET Reactor DevOps/Pipelines integration consists of 2 tasks:
This is the .NET Reactor Install Task. It installs .NET Reactor and allows you to set up a license if needed. You also need the .NET Reactor Task to use .NET Reactor.
- Version: (Required) Specify the exact version of .NET Reactor to install, including major, minor, build, and revision numbers (e.g., 6.9.8.0).
- License: (Optional) Provide the .NET Reactor license as either a file path or a base64-encoded string. Without a license, .NET Reactor will run in demo mode. If .NET Reactor doesn't run as full version the protected software will stop working after 14 days.
Example Usage
steps:
- task: DotNetReactorTool@2
inputs:
version: '6.9.8.0'
Example Usage With License
steps:
- task: DownloadSecureFile@1
name: licenseFile
inputs:
secureFile: 'license.v3lic'
- task: DotNetReactorTool@2
inputs:
version: '6.9.8.0'
license: '$(licenseFile.secureFilePath)'
Task 2: '.NET Reactor Task'
This task runs .NET Reactor to obfuscate .NET assemblies. It uses the configuration defined in the .NET Reactor Tool Installer action.
- reactorProjectFilePath: (Optional) Path to the .NET Reactor project file.
- additionalArguments: (Optional) Additional command-line parameters for .NET Reactor. Use -licensed to ensure this action fails with error code 101 if .NET Reactor is not fully licensed. If .NET Reactor doesn't run as full version the protected software will stop working after 14 days. This can help identify licensing issues early in the pipeline.
Example Usage
steps:
- task: ProtectWithDotNetReactor@2
displayName: 'Protect With .NET Reactor'
inputs:
reactorProjectFilePath: 'reactor_files/reactor_project.nrproj'
additionalArguments: '-licensed'
Full Example
Here's a full example that installs and runs .NET Reactor:
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build'
- task: DownloadSecureFile@1
name: licenseFile
inputs:
secureFile: 'license.v3lic'
- task: DotNetReactorTool@2
displayName: 'Install .NET Reactor Licnse'
inputs:
version: '6.9.8.0'
license: '$(licenseFile.secureFilePath)'
- task: ProtectWithDotNetReactor@2
displayName: 'Protect With .NET Reactor'
inputs:
reactorProjectFilePath: 'reactor_files/reactor_project.nrproj'
additionalArguments: '-licensed'
If you're feeling motivated, come visit our website.