Build from Source
Prerequisites
| Requirement | Notes |
|---|---|
| Windows, Linux or macOS | The application is built with Avalonia and builds on all three platforms |
| .NET 11 SDK | Pinned by global.json |
| Git | To clone the repository |
| JetBrains ReSharper command-line tools | Required for the jb inspectcode check that CI enforces |
The repository contains the standalone 7-Zip 26.03 fallback executables (7za.exe, 7za_arm64.exe), so no extra download is required to build the Windows bundles.
Clone and build
git clone https://github.com/purelogiccode/RomValidator.git
cd RomValidator
dotnet build CSharp_RomValidator.sln --configuration Release
Run the tests
dotnet test CSharp_RomValidator.sln --configuration Release --nologo
The test project (RomValidator.Tests) uses xUnit and coverlet. Tests cover models, services, hash calculation, archive handling, HTTP-based services (with a fake handler) and file-system helpers. The suite runs on Windows, Linux and macOS.
Run the application
dotnet run --project RomValidator/RomValidator.csproj
Publish
The release workflow publishes single-file, framework-dependent builds for every supported runtime identifier:
dotnet publish RomValidator/RomValidator.csproj `
--configuration Release `
--runtime win-x64 `
--self-contained false `
--output publish/win-x64 `
-p:PublishSingleFile=true `
-p:IncludeNativeLibrariesForSelfExtract=true
Use the same command with another runtime identifier to target Linux or macOS, for example linux-x64, linux-arm64, osx-x64 or osx-arm64. The release workflow packages the publish output as follows:
| Runtime identifier | Release bundle |
|---|---|
win-x64, win-arm64 | release_<version>_<rid>.zip |
linux-x64, linux-arm64 | release_<version>_<rid>.tar.gz |
osx-x64, osx-arm64 | release_<version>_<rid>.dmg (contains ROM Validator.app) |
The published bundles are framework-dependent: install the .NET 11 Desktop Runtime on Windows or the .NET 11 runtime on Linux and macOS. To produce a self-contained build instead, use --self-contained true.
The publish output includes:
RomValidator.exe(Windows) orRomValidator(Linux/macOS), a single binary containing the application and its dependencies but not the .NET runtime,RomValidator.xml(XML documentation) when generated locally; the release workflow removes it together with.pdbfiles,- optional package files such as
LICENSE.txt,ReadMe.mdandWhatsNew.md, plus7za.exeand7za_arm64.exeon Windows, added by the release workflow.
Linux and macOS use a system-installed 7zz, 7z or 7za when available.
Project layout
CSharp_RomValidator.sln
├── RomValidator/ Avalonia application
│ ├── App.axaml Fluent theme and custom dark palette
│ ├── Program.cs Avalonia entry point
│ ├── MainWindow.axaml shell with header, page host and status bar
│ ├── Pages/ Validate ROMs and Generate DAT views (.axaml)
│ ├── Views/ themed message dialog
│ ├── Interfaces/ service abstractions
│ ├── Models/ data models (No-Intro XML, bug report, GitHub release)
│ ├── Services/ hashing, archives, logging, reporting, paths
│ └── RomValidator.csproj
├── RomValidator.Tests/ xUnit test project
└── docs/ this documentation site
Code style
The build runs the Meziantou and Roslynator analyzers and fails on warnings. Keep the build at zero warnings and add tests for behavior changes. XML documentation is required for public members (GenerateDocumentationFile is enabled). Before committing, run jb inspectcode over the solution; CI fails when it reports any finding. See Contributing for the full checklist.