Relatude Help

Shipping a module

A module is a class library that references Relatude.DB.CMS, packed with dotnet pack. With views, it is a Razor class library:

<Project Sdk="Microsoft.NET.Sdk.Razor">
  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
    <PackageId>MyCompany.Events</PackageId>
    <Version>1.0.0</Version>
  </PropertyGroup>
  <ItemGroup>
    <FrameworkReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Relatude.DB.CMS" Version="…" />
    <EmbeddedResource Include="ui\**" LogicalName="cms-ui/%(RecursiveDir)%(Filename)%(Extension)" />
  </ItemGroup>
</Project>

Before the first release:

  • Pin the ids of its node types and relations ([Node(Id = …)], [Relation(Id = …)]), so a rename or a move keeps the data.
  • Keep its model types in a namespace of their own, so AddNamespace adds nothing else.
  • Fix its name. Its seed steps are remembered by it, the settings turn it off by it, and its commands and jobs are named after it.