From 0a603f94d0e1193be9f64cb444334710567de32d Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Thu, 14 May 2026 13:55:07 -0400 Subject: [PATCH] mbproxy/README: route publish steps through install/publish.ps1 The README was telling readers to memorise the dotnet publish flag set; now it points at the script that captures both flavours so the documented path matches what we actually run. Co-Authored-By: Claude Opus 4.7 (1M context) --- mbproxy/README.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/mbproxy/README.md b/mbproxy/README.md index 4739881..2e62fd5 100644 --- a/mbproxy/README.md +++ b/mbproxy/README.md @@ -72,13 +72,20 @@ The `docs/` tree is organized by topic. Start with [`docs/design.md`](docs/desig dotnet build Mbproxy.slnx -c Debug ``` -**Publish (Release, single-file self-contained, win-x64):** +**Publish (Release, single-file, win-x64):** ```powershell -dotnet publish src/Mbproxy/Mbproxy.csproj -c Release -r win-x64 --self-contained true -o C:\build\mbproxy-publish +.\install\publish.ps1 -Clean ``` -The published output is a single `Mbproxy.exe` (~100 MB). The self-contained publish bundles the full .NET 10 + ASP.NET Core runtime. No .NET installation is required on the target machine. +Produces both flavours under `publish-out\`: + +| Flavour | Path | Size | Target prerequisite | +|---|---|---|---| +| Self-contained | `publish-out\self-contained\Mbproxy.exe` | ~100 MB | None — bundles .NET 10 + ASP.NET Core runtime | +| Framework-dependent | `publish-out\framework-dependent\Mbproxy.exe` | ~1.5 MB | .NET 10 + ASP.NET Core preinstalled | + +Pass `-OutputDir ` to publish elsewhere; omit `-Clean` to skip the wipe. The script wraps `dotnet publish src/Mbproxy/Mbproxy.csproj -c Release -r win-x64 [-p:SelfContained=false]` — run those directly if you only need one flavour. **Run tests:** @@ -102,11 +109,11 @@ Edit `src/Mbproxy/appsettings.json` to configure PLCs before running. The admin Full detail is in [`docs/operations.md`](docs/operations.md). Quick path: ```powershell -# 1. Publish -dotnet publish src/Mbproxy/Mbproxy.csproj -c Release -r win-x64 --self-contained true -o C:\build\mbproxy-publish +# 1. Publish (produces publish-out\self-contained\ and publish-out\framework-dependent\) +.\install\publish.ps1 -Clean -# 2. Install (elevated PowerShell) -.\install\install.ps1 -PublishOutput C:\build\mbproxy-publish -Start +# 2. Install (elevated PowerShell) — point at the flavour you want to deploy +.\install\install.ps1 -PublishOutput .\publish-out\self-contained -Start # 3. Edit the config that was placed at %ProgramData%\mbproxy\appsettings.json