Use this guide when you are working from the source tree, validating changes locally, or preparing a release.
- Windows 11
- .NET 9 SDK
- administrative rights only when testing install, service update, or service-backed write behavior
Build the solution:
dotnet build SessionGuard.slnRun the test suite:
dotnet test SessionGuard.slnRun the desktop app only:
dotnet run --project src/SessionGuard.App/SessionGuard.App.csprojRun with the local service host:
In one PowerShell window:
dotnet run --project src/SessionGuard.Service/SessionGuard.Service.csproj -- consoleIn another:
dotnet run --project src/SessionGuard.App/SessionGuard.App.csprojThe app should report Control plane: Service when the local service host is active.
Run UI smoke only:
powershell -ExecutionPolicy Bypass -File scripts/ui/Run-UiSmoke.ps1Run the full local validation flow:
powershell -ExecutionPolicy Bypass -File scripts/ci/Invoke-WindowsValidation.ps1Use the manual checklist when you want a structured release-readiness pass:
Preferred combined install path:
powershell -ExecutionPolicy Bypass -File scripts/install/Install-SessionGuard.ps1 -SelfContainedUseful switches:
-DoNotLaunchApp-DoNotStartService-SkipBundleVerification-ValidateOnly -AsJson
Service-only path:
powershell -ExecutionPolicy Bypass -File scripts/service/Publish-SessionGuardService.ps1
powershell -ExecutionPolicy Bypass -File scripts/service/Install-SessionGuardService.ps1Publish the desktop app:
powershell -ExecutionPolicy Bypass -File scripts/app/Publish-SessionGuardApp.ps1Publish the combined setup layout:
powershell -ExecutionPolicy Bypass -File scripts/install/Publish-SessionGuardBundle.ps1 -SelfContainedVerify the published bundle layout before install:
powershell -ExecutionPolicy Bypass -File scripts/install/Verify-SessionGuardBundle.ps1 -BundleRoot artifacts/publish/SessionGuardPublish full release assets locally:
powershell -ExecutionPolicy Bypass -File scripts/release/Publish-SessionGuardReleaseAssets.ps1 -SelfContainedThat produces:
sessionguard-win11-setup-<version>-win-x64.zipsessionguard-win11-app-<version>-win-x64.zipsessionguard-win11-service-<version>-win-x64.zipsessionguard-win11-source-<version>.zipsessionguard-win11-sha256-<version>.txt
For direct-download release prep, verify the generated setup zip hash against that checksum file and keep the checksum asset with the published release.
SessionGuard uses standard Authenticode signing for official releases. EV signing is still optional outside the repo and is mainly a trust and SmartScreen reputation choice, not a code requirement.
Supported signing inputs:
SESSIONGUARD_SIGN_CERT_BASE64: base64-encoded.pfxSESSIONGUARD_SIGN_CERT_FILE: local path to a.pfxSESSIONGUARD_SIGN_CERT_PASSWORD:.pfxpasswordSESSIONGUARD_SIGN_TIMESTAMP_URL: optional RFC3161 timestamp URLSESSIONGUARD_SIGNTOOL_PATH: optional explicitsigntool.exepath
Official tag releases should use the release workflow with signing required. Local builds can stay unsigned unless you explicitly supply a certificate.
For GitHub Actions, configure SESSIONGUARD_SIGN_CERT_BASE64 and SESSIONGUARD_SIGN_CERT_PASSWORD as repository secrets. Optional timestamp and signtool.exe overrides can be supplied through repository variables.
Local signed release example:
powershell -ExecutionPolicy Bypass -File scripts/release/Publish-SessionGuardReleaseAssets.ps1 -Version <next-version> -Configuration Release -Runtime win-x64 -SelfContained -RequireSigning
powershell -ExecutionPolicy Bypass -File scripts/signing/Verify-SessionGuardReleaseSignatures.ps1 -OutputRoot artifacts/releases/<next-version> -RequireSignedGitHub Actions will publish release assets when you push an annotated vX.Y.Z tag.
Requirements:
- the tag must match
Directory.Build.props - the matching release notes file must exist under
docs/releases
Example:
git tag -a v<next-version> -m "SessionGuard <next-version>"
git push origin main
git push origin v<next-version>The release workflow:
- runs the repo-owned Windows validation flow
- publishes self-contained
win-x64binaries - requires configured signing secrets and verifies official release signatures
- creates the setup, app, service, source, and checksum assets
- uploads those assets to the matching GitHub Release