The relsvr-rap CLI builds Relativity Application Package (RAP) files from your application schema, assemblies, and custom pages.
relsvr-rap.exe build --source <path> --input <file> --version <version> --relativity-server-release <year> [--warnings-as-errors <true|false>] [--log-file <path>] [--log-level <level>]
| Parameter | Required | Type | Description |
|---|---|---|---|
| --source | Yes | String | Repository root for the RAP build. Paths inside the input XML are resolved from this directory. |
| --input | Yes | String | Path to the RAP build XML (for example, DevelopmentScripts\build.xml). Can be absolute or relative to --source. |
| --version | Yes | String | RAP package version (for example, 1.0.0.0). |
| --relativity-server-release | Yes | Integer | Target Relativity Server release year (for example, 2024, 2025). |
| --warnings-as-errors | No | Boolean | Treat warnings as build failures when set to true. |
| --log-file | No | String | File path for build logs (for example, Artifacts\Logs\rapbuild.log). |
| --log-level | No | String | Logging verbosity. Typical values: Debug, Information, Warning, Error, Fatal. |
From the repo root (server-sample-rap):
relsvr-rap.exe build `
--source "C:\Projects\MyRelativityApp" `
--input "DevelopmentScripts\build.xml" `
--version "1.0.0.0" `
--relativity-server-release 2024 `
--log-file "Artifacts\Logs\rapbuild.log"The repository build script (build.ps1) already runs this command after restore/build steps.
relsvr-rap.exe build --source C:\MyApp --input DevelopmentScripts\build.xml --version 1.0.0.0 --relativity-server-release 2025relsvr-rap.exe build --source C:\MyApp --input DevelopmentScripts\build.xml --version 2.0.0.0 --relativity-server-release 2025 --warnings-as-errors falserelsvr-rap.exe build `
--source "C:\Projects\MyRelativityApp" `
--input "DevelopmentScripts\build.xml" `
--version "1.5.0.0" `
--relativity-server-release 2025 `
--warnings-as-errors false `
--log-file "Artifacts\Logs\rapbuild.log" `
--log-level DebugMyRelativityApplication/
├── DevelopmentScripts/
| └── build.xml
├── ApplicationsXML/
| └── application.xml
├── Source/
| ├── MyApp/
| | ├── MyApp.csproj
| | └── bin/
| | └── MyApp.dll
| └── MyApp.CustomPage/
| ├── MyApp.CustomPage.csproj
| ├── Controllers/
| ├── Views/
| └── MyApp.CustomPage/
└── Artifacts/
├── Logs/
└── MyRelativityApplication.rap
The XML file provided to --input defines what goes into the RAP package.
<BuildTools>
<RAPBuilder>
<Applications>
<Application name="SampleRap">
<Destination>Artifacts\SampleRap.rap</Destination>
<ApplicationSchema>ApplicationsXML/application.xml</ApplicationSchema>
<Assemblies>
<Assembly>Source\SampleRap\bin\SampleRap.dll</Assembly>
</Assemblies>
<ResourceFiles />
<CustomPages>
<CustomPage guid="a412cfce-098d-4339-96ba-72933ac2e707">Source\SampleRap.CustomPage\SampleRap.CustomPage</CustomPage>
</CustomPages>
</Application>
</Applications>
</RAPBuilder>
</BuildTools>The application.xml schema must stay aligned with build.xml.
- Assembly names in
application.xmlmust match assemblies included inbuild.xml. - Custom page GUIDs must match exactly between both files.
- The application name/version metadata should reflect the package you are building.
The easiest way to create application.xml is exporting the application schema from Relativity and then validating that it matches your build inputs.
After a successful build in this repository:
Artifacts/
├── Logs/
| ├── buildsummary.log
| ├── builderrors.log
| └── rapbuild.log
└── SampleRap.rap
SampleRap.rap is the deployable package.
| Error | Cause | Solution |
|---|---|---|
relsvr-rap is not recognized |
Tool not installed or not on PATH |
Install the tool and ensure your shell can resolve relsvr-rap |
| Source directory does not exist | Invalid source` path | Verify the path exists and is readable |
| Project input file does not exist | Invalid input` path | Ensure DevelopmentScripts\build.xml exists at the specified location |
| Assembly not found in schema | build.xml and application.xml are out of sync |
Add/update the assembly entry in application.xml |
| Custom page GUID mismatch | GUID differs between files | Ensure the same GUID is used in both files |
0Success1General error (for example, bad path or missing file)4RAPBuilder validation/build logic error