Configuration Reference
RAP Builder uses two XML configuration files to define how a RAP is built:
- build.xml - Tells RAP Builder where to find the compiled artifacts (assemblies, custom pages, resource files) and where to write the output
.rapfile. - application.xml - The application schema that describes the structure and metadata of the Relativity application.
Both files must be consistent - component names and GUIDs must match exactly (including case) between the two files.
build.xml
The build.xml file is the primary input to RAP Builder. It defines one or more applications to package and the paths to their components.
Complete Schema
<BuildTools>
<RAPBuilder>
<Applications>
<Application name="YourApplicationName" generatenuspec="true">
<Destination>Artifacts\YourApp.rap</Destination>
<ApplicationSchema>ApplicationsXML/application.xml</ApplicationSchema>
<TestDirectory>Source\YourApp.Tests\bin\</TestDirectory>
<Assemblies>
<Assembly>Source\YourApp\bin\YourApp.dll</Assembly>
<Assembly>Source\YourApp\bin\AnotherAssembly.dll</Assembly>
</Assemblies>
<ResourceFiles>
<ResourceFile>Source\YourApp\Resources\image.jpg</ResourceFile>
</ResourceFiles>
<CustomPages>
<CustomPage guid="00000000-0000-0000-0000-000000000000">Source\YourApp.CustomPage\PageDirectory</CustomPage>
</CustomPages>
</Application>
</Applications>
</RAPBuilder>
</BuildTools>
Element Reference
<Application>
The root element for a single RAP definition. You can define multiple <Application> elements inside <Applications> to build multiple RAPs from the same build.xml.
| Attribute | Required | Description |
|---|---|---|
name
|
Yes | The name of the application. Must match the <Name> element in application.xml. |
generatenuspec
|
No | When "true", RAP Builder generates a .nuspec file alongside the .rap file (useful for NuGet-based distribution). |
<Destination>
Required. The output path for the .rap file, relative to the --source directory. Must end with .rap.
<Destination>Artifacts\MyApp.rap</Destination>
<ApplicationSchema>
Required. Path to the application.xml file, relative to the --source directory.
<ApplicationSchema>ApplicationsXML/application.xml</ApplicationSchema>
<TestDirectory>
Optional. Path to a directory containing test assemblies. The directory must exist if this element is specified. This is used to include test assemblies in the RAP for integration testing.
<TestDirectory>Source\MyApp.Tests\bin\</TestDirectory>
<Assemblies>
Optional. Contains one or more <Assembly> elements. Each <Assembly> specifies the path to a compiled .dll file, relative to the --source directory.
<Assemblies>
<Assembly>Source\MyApp\bin\MyApp.dll</Assembly>
<Assembly>Source\MyApp\bin\MyApp.Helpers.dll</Assembly>
</Assemblies>
Important:
- Every assembly listed here must have a corresponding
<Assembly>entry inapplication.xmlwith a matching<Name>(the filename, including.dll). - Names are case-sensitive -
MyApp.dllandmyapp.dllare treated as different files.
<ResourceFiles>
Optional. Contains one or more <ResourceFile> elements. Each specifies the path to a resource file (images, documents, etc.) relative to the --source directory.
<ResourceFiles>
<ResourceFile>Source\MyApp\Resources\logo.png</ResourceFile>
<ResourceFile>Source\MyApp\Resources\config.json</ResourceFile>
</ResourceFiles>
Important:
- Every resource file listed here must have a corresponding
<ResourceFile>entry inapplication.xmlwith a matching<Name>. - Names are case-sensitive.
<CustomPages>
Optional. Contains one or more <CustomPage> elements. Each specifies a directory containing custom page files (ASP.NET pages, scripts, etc.).
<CustomPages>
<CustomPage guid="a1b2c3d4-e5f6-7890-abcd-ef1234567890">Source\MyApp.CustomPage\MyPage</CustomPage>
</CustomPages>
| Attribute | Required | Description |
|---|---|---|
guid
|
Yes | The GUID identifying this custom page. Must match the <Guid> element in the corresponding <CustomPage> entry in application.xml. |
The element text is the path to the custom page directory, relative to the --source directory.
Important:
- GUIDs are case-sensitive - use a consistent format (lowercase recommended).
- The path should point to the directory containing the custom page files, not to an individual file.
- RAP Builder zips the contents of this directory and includes it in the RAP.
application.xml
The application.xml file is the application schema that describes your Relativity application's structure. It is typically exported from a Relativity environment and then maintained alongside your source code.
Minimal Example
Below is a minimal application.xml showing the most commonly used elements:
<?xml version="1.0" encoding="UTF-8"?>
<Application xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DeploymentTarget>Server</DeploymentTarget>
<ArtifactViewFields />
<Assemblies>
<Assembly>
<ArtifactId>1000001</ArtifactId>
<Keywords />
<Name>MyApp.dll</Name>
<Notes />
</Assembly>
</Assemblies>
<ResourceFiles />
<ExternalTabs />
<CustomPages>
<CustomPage>
<ArtifactID>1040001</ArtifactID>
<Guid>a1b2c3d4-e5f6-7890-abcd-ef1234567890</Guid>
<Name>MyCustomPage</Name>
<FileName>MyCustomPage.zip</FileName>
<Keywords />
<Notes />
</CustomPage>
</CustomPages>
<Guid>12345678-abcd-ef01-2345-6789abcdef01</Guid>
<Name>My Relativity App</Name>
<Version>1.0.0.0</Version>
</Application>
Element Reference
<Application> (Root)
The root element for the application schema.
<Assemblies>
Contains <Assembly> entries for every .NET assembly included in the RAP.
<ResourceFiles>
Contains <ResourceFile> entries for non-assembly files included in the RAP.
<CustomPages>
Contains <CustomPage> entries for ASP.NET custom pages.
Application Metadata
These elements describe the application itself:
| Element | Description |
|---|---|
<Guid>
|
A unique GUID identifying the application. |
<Name>
|
The application display name. Should match the name attribute on <Application> in build.xml. |
<Version>
|
The application version. Auto-updated by RAP Builder to match the --version argument. |
<DeploymentTarget>
|
Set to Server for Relativity Server applications. |
<ExtractionDate>
|
Timestamp of when the schema was extracted. |
<IsRelativityApplication>
|
Set to true. |
Auto-Generated Fields
RAP Builder automatically computes and updates these fields in application.xml during the build process - you do not need to set them manually:
| Field | Location | Description |
|---|---|---|
<Hash>
|
Assemblies | SHA1 hash of the assembly file (hex format with dashes). |
<Hash>
|
Custom Pages | SHA1 hash of the zipped custom page. |
<Size>
|
Custom Pages | File size of the zipped custom page in bytes. |
<Version>
|
Application root | Updated to the --version value passed to RAP Builder. |
<ApplicationVersion>
|
Custom Pages | Updated to the --version value. |
Cross-File Validation Rules
RAP Builder validates that build.xml and application.xml are consistent. The following rules must be satisfied:
Assembly Names Must Match
Every <Assembly> path in build.xml must have a corresponding <Assembly><Name> entry in application.xml. The filename (the last segment of the path) must match the <Name> text exactly, including case.
build.xml:
<Assembly>Source\MyApp\bin\MyApp.Core.dll</Assembly>
application.xml (must match):
<Assembly>
<Name>MyApp.Core.dll</Name>
...
</Assembly>
Custom Page GUIDs Must Match
Every <CustomPage guid="..."> in build.xml must have a corresponding <CustomPage><Guid> entry in application.xml. The GUID value must match exactly.
build.xml:
<CustomPage guid="a1b2c3d4-e5f6-7890-abcd-ef1234567890">...</CustomPage>
application.xml (must match):
<CustomPage>
<Guid>a1b2c3d4-e5f6-7890-abcd-ef1234567890</Guid>
...
</CustomPage>
Resource File Names Must Match
Every <ResourceFile> path in build.xml must have a corresponding <ResourceFile><Name> entry in application.xml. The filename must match exactly, including case.
Destination Must End with .rap
The <Destination> path must end with the .rap file extension.
NuGet Package Configuration
Relativity Server SDK packages are distributed via Relativity's Artifactory NuGet feed. Your project should have a nuget.config at the repository root that includes this feed:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="globalPackagesFolder" value="%userprofile%\.nuget\packages-server" />
</config>
<packageSources>
<clear />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json"/>
<!-- Use only one of the following public feeds depending on your geographic region. -->
<add key="ServerArtifactoryNuGet" value="https://relativitypackageseastus.jfrog.io/artifactory/api/nuget/v3/server-nuget-virtual" />
<!-- <add key="ServerArtifactoryNuGet" value="https://relativitypackageswesteurope.jfrog.io/artifactory/api/nuget/v3/server-nuget-virtual" /> -->
<!--<add key="LocalNuGet" value="C:\MyLocalNuget" />-->
</packageSources>
<packageSourceMapping>
<packageSource key="ServerArtifactoryNuGet">
<package pattern="Relativity.Server.*" />
</packageSource>
<packageSource key="NuGet.org">
<package pattern="*" />
</packageSource>
<!--
<packageSource key="LocalNuGet">
<package pattern="*" />
</packageSource>
-->
</packageSourceMapping>
</configuration>
A European mirror is also available: https://relativitypackageswesteurope.jfrog.io/artifactory/api/nuget/v3/server-nuget-virtual
On this page