Skip to content

Building from Source

Samuel Costa edited this page Jul 5, 2026 · 1 revision

Building from Source

Prerequisites

Project layout

src/OneClickTransfer.Core       — all business logic: models, services, i18n. No UI dependency.
src/OneClickTransfer.Avalonia   — cross-platform UI (v3), Avalonia 11, MVVM (CommunityToolkit.Mvvm).
src/OneClickTransfer            — frozen Windows-only WPF v2 (kept for reference; not developed further).
TransferApp.ps1, *.vbs          — original v1 (PowerShell/VBScript), kept for history only.
tests/OneClickTransfer.Core.Tests       — unit tests for the Core project.
tests/OneClickTransfer.Avalonia.Tests   — unit tests for the Avalonia ViewModels.
tools/build-v3.ps1              — publish script (self-contained single-file binaries).

The actively developed app is OneClickTransfer.Avalonia (+ the shared OneClickTransfer.Core it depends on). The WPF v2 project still builds and is kept around, but isn't where new features land.

Run from source

dotnet run --project src/OneClickTransfer.Avalonia

Run the CLI from source

dotnet run --project src/OneClickTransfer.Avalonia -- --list

(Anything after -- is passed through as CLI arguments — see Command Line Interface.)

Run the tests

dotnet test 1clickTransfer.sln -c Release

Covers both OneClickTransfer.Core.Tests and OneClickTransfer.Avalonia.Tests. FTP/SFTP network calls aren't exercised directly in unit tests (no live server dependency) — the parts of the transfer logic that talk to a server are structured so the decision logic (does this file exist, is it newer, what's the destination path) can be tested without a network connection; only the raw socket-level calls are excluded from automated coverage.

Publish self-contained binaries

powershell -NoProfile -ExecutionPolicy Bypass -File tools/build-v3.ps1 -Rid win-x64
# or: linux-x64, osx-x64, osx-arm64, or "all" for every RID

Produces single-file, self-contained executables in dist-v3/, matching the exact naming used in GitHub Releases (1clickTransfer-<rid>.zip, with a proper .app bundle — icon included — for the macOS RIDs).

Never add -p:PublishTrimmed=true or -p:PublishAot=true to any publish command — Avalonia doesn't support trimming/AOT and the build will break in subtle ways at runtime.

Contributing

This is primarily a personal-use project, but bug reports and small, focused pull requests are welcome via GitHub Issues and Pull Requests. If you're proposing a larger change, opening an issue to discuss the approach first is appreciated.

Clone this wiki locally