CLI: build Command

RAP Builder is invoked using the relsvr-rap command.

Commands

relsvr-rap currently exposes a single command:

Command Description
build Packages your application artifacts into a .rap file, validating the inputs and verifying SDK compatibility.

Each command has its own set of arguments. The arguments for build are documented below.

Synopsis

Copy
relsvr-rap build [OPTIONS]

build Arguments

Required Arguments

Argument Short Form Type Description
--source -s string The root directory of your repository. All relative paths in the --input file are resolved against this directory.
--input -i string Path to the build.xml file that describes the RAP components to package.
--version -v string The application version to stamp on the RAP (e.g., 1.0.0.0). This updates the <Version> element in application.xml.
--relativity-server-release -r integer The Relativity Server version this RAP targets. Valid values: 2024, 2025, 2026.

Optional Arguments

Argument Short Form Type Default Description
--warnings-as-errors -w boolean true Treat warnings as build failures when set to true. For Server 2026 builds, assemblies that do not target .NET Framework 4.8.1 produce warnings, so the default true fails the build until they are retargeted or exempted.
--target-framework-exemptions string (none) Path to the exemptions text file that lists the assemblies to exempt from the Server 2026 .NET Framework 4.8.1 check. See Exempting assemblies from the target framework check.
--log-file -l string RAPBuilderLogs/log_<timestamp>.txt Path for the build log file. If not specified, a timestamped log file is created in a RAPBuilderLogs directory.
--log-level --ll string Information Minimum severity level for log output. See Log Levels below.

Log Levels

The --log-level argument accepts the following values (from most to least verbose):

Level Description
Verbose Logs the most detailed diagnostic output, including per-assembly validation tracing.
Debug Logs diagnostic information useful for troubleshooting.
Information Logs standard progress messages. This is the default.
Warning Logs only warnings and errors.
Error Logs only errors.
Fatal Logs only fatal errors that halt execution.

Usage Examples

Basic Build

Copy
relsvr-rap build --source . --input build.xml --version 1.0.0 --relativity-server-release 2025

Using Short-Form Arguments

Copy
relsvr-rap build -s . -i build.xml -v 1.0.0 -r 2025

Build with Debug Logging

Copy
relsvr-rap build `
  --source . `
  --input DevelopmentScripts/build.xml `
  --version 2.1.0.0 `
  --relativity-server-release 2025 `
  --log-level Debug `
  --log-file logs/build-debug.log

Allow Warnings Without Failing the Build

Copy
relsvr-rap build `
  --source . `
  --input build.xml `
  --version 1.0.0 `
  --relativity-server-release 2025 `
  --warnings-as-errors false

Server 2026 builds. When you target --relativity-server-release 2026, RAP Builder validates that every assembly targets .NET Framework 4.8.1 and reports Warning-level findings for any that do not. Because --warnings-as-errors defaults to true, a 2026 build fails until those assemblies are retargeted. While migrating, pass --warnings-as-errors false to surface the findings without failing the build. See Target Framework Validation (Server 2026).

Exempt Specific Assemblies from the .NET Framework 4.8.1 Check

Copy
relsvr-rap build `
  --source . `
  --input build.xml `
  --version 1.0.0 `
  --relativity-server-release 2026 `
  --target-framework-exemptions DevelopmentScripts/target-framework-exemptions.txt

Exempting assemblies from the target framework check

Use --target-framework-exemptions <exemption-file> when a third-party assembly in your RAP cannot target .NET Framework 4.8.1 and you cannot replace it yet.

The exemptions file is plain text:

  • One assembly file name per line (for example Legacy.Vendor.dll).
  • Matching is by file name only, ignores case, and applies wherever the assembly sits in the RAP.
  • Blank lines and lines starting with # are ignored.
Copy
# Vendor DLLs we cannot retarget yet
Legacy.Vendor.dll
Old.Reporting.Library.dll

Behavior:

  • An exempted assembly does not fail the build. RAP Builder logs it at Information level and records it in the build results.
  • Exemptions apply to the .NET Framework 4.8.1 check only. They do not affect SDK version validation.
  • The option only applies when you build with --relativity-server-release 2026. For 2024 and 2025, RAP Builder does not apply the file and logs a warning to tell you it was ignored.
  • The path must be a single existing file. A missing file, a wildcard pattern, or a directory fails the build with a "does not exist" error.
  • If you build multiple RAPs with a single relsvr-rap build command, the same exemptions file applies to all of them.
  • RAP Builder warns about target framework exemptions file entries that are never used (likely a typo) and about entries whose assembly already targets 4.8.1 (remove them).

Exit Codes

Code Meaning
0 Build completed successfully.
1 General error (bad path, missing file, invalid arguments).
4 RAPBuilder validation or build logic error (schema mismatch, SDK version failure, etc.).

Viewing Help

To display built-in help text:

Copy
relsvr-rap --help
relsvr-rap build --help

To display the installed version:

Copy
relsvr-rap --version
Feedback