Skip to content

Adopt the standard C# repository layout#1

Merged
hsbt merged 8 commits into
masterfrom
claude/rbmanager-csharp-layout-644d9f
Jul 11, 2026
Merged

Adopt the standard C# repository layout#1
hsbt merged 8 commits into
masterfrom
claude/rbmanager-csharp-layout-644d9f

Conversation

@hsbt

@hsbt hsbt commented Jul 11, 2026

Copy link
Copy Markdown
Member

This moves the product to src/rbmanager and the tests to tests/rbmanager.Tests, and enables the SDK artifacts output layout (UseArtifactsOutput) so build output goes under artifacts/ instead of per-project bin/ and obj/. It also adds the conventional root files .gitattributes, .editorconfig, and global.json.

The MSI authoring becomes a WiX SDK-style project at src/rbmanager.Installer built with dotnet build, with ICE validation running as part of the build. The UpgradeCode and the PATH component GUID never change, so they are baked in as constants and docs/upgrade-code.md keeps the derivation. The installer project is excluded from solution builds because it packages the published NativeAOT rb.exe, and build-installer.ps1 shrinks to a thin wrapper that publishes and builds.

CI on windows-latest builds the solution and runs the full test suite. The hosted image has Visual Studio with MSVC, so the RequiresVS and Publish suites run for real instead of skipping. All suites pass locally (106 passed, 1 network-gated skip), and the built MSI's Upgrade, Environment, and Component tables are unchanged from the previous script-driven build.

Generated with Claude Code

hsbt and others added 8 commits July 10, 2026 14:58
Move the product to src/rbmanager, the test suite to
tests/rbmanager.Tests, and the WiX source to installer/. Enable the
SDK artifacts output layout (UseArtifactsOutput) so build output goes
to artifacts/ instead of per-project bin/obj, which the test helpers'
path resolution now relies on.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Normalize text line endings in the object store and renormalize the
two files that had CRLF committed. Windows script types stay CRLF in
the working tree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Whitespace and charset basics plus the file-scoped namespace style the
codebase already uses, so editors and dotnet format agree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pin the SDK to the 8.0.4xx feature band. The artifacts output layout
assumes SDK 8+, so this also makes the floor explicit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The authoring moves to src/rbmanager.Installer (WixToolset.Sdk 5.0.2)
and builds with dotnet build, ICE validation included, replacing the
wix CLI tool manifest. The UpgradeCode and PATH component GUID never
change, so they are baked in as constants with the derivation kept in
docs/upgrade-code.md. Solution builds skip the project because it
packages the published NativeAOT rb.exe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Build the solution and run the full test suite on windows-latest,
where the hosted image has VS with MSVC so the RequiresVS and Publish
suites run for real instead of skipping.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rb enable/exec and the VC++ redistributable handling in rb setup were
missing, and the published exe is ~6 MB now.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 11, 2026 05:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures the repo into the conventional src/ + tests/ layout and switches .NET builds to the SDK artifacts output layout (artifacts/). It also modernizes MSI authoring into a WiX SDK-style project built via dotnet build, and adds/expands product behavior + coverage around setup/path/devkit/VC++ runtime detection.

Changes:

  • Move product to src/rbmanager and tests to tests/rbmanager.Tests, with UseArtifactsOutput routing build output under artifacts/.
  • Convert the installer to a WiX SDK-style project (src/rbmanager.Installer) and simplify build-installer.ps1 to “publish then build MSI”.
  • Add substantial new product logic (VC++ redist detection/consent/install, user PATH management, devkit enable/exec) with a broad new test suite and CI on windows-latest.

Reviewed changes

Copilot reviewed 17 out of 47 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/rbmanager.Tests/VcRedistTests.cs Adds unit + opt-in network tests for VC++ redist detection and signature verification.
tests/rbmanager.Tests/UserPathTests.cs Adds integration tests for PATH registry manipulation behavior.
tests/rbmanager.Tests/Support/Zips.cs Adds helper for generating zip fixtures in-memory/on-disk.
tests/rbmanager.Tests/Support/VsWhereScope.cs Adds helper to temporarily override Devkit.VsWhere in tests.
tests/rbmanager.Tests/Support/TempDir.cs Adds temp directory helper with best-effort cleanup.
tests/rbmanager.Tests/Support/Serial.cs Adds xUnit collection to prevent parallelism for tests touching process-global state.
tests/rbmanager.Tests/Support/ScratchRegistryKey.cs Adds scratch HKCU registry key helper for safe registry-based tests.
tests/rbmanager.Tests/Support/RbSandbox.cs Adds in-proc sandbox for integration tests using env var seams + scratch registry.
tests/rbmanager.Tests/Support/Rb.cs Updates product exe path resolution for artifacts output layout.
tests/rbmanager.Tests/Support/PublishFixture.cs Updates publish fixture to locate csproj under src/ and artifacts layout.
tests/rbmanager.Tests/Support/LoopbackZipServer.cs Adds local-only HTTP server helper for URL install path tests.
tests/rbmanager.Tests/Support/EnvScope.cs Adds helper to set/restore environment variables during tests.
tests/rbmanager.Tests/Support/E2eSandbox.cs Adds per-test sandbox for process-boundary E2E tests without mutating parent env.
tests/rbmanager.Tests/Support/ConsoleCapture.cs Adds helper to capture and normalize stdout/stderr in tests.
tests/rbmanager.Tests/SmokeTests.cs Adds smoke test verifying product reference + InternalsVisibleTo.
tests/rbmanager.Tests/SingleRootDirectoryTests.cs Adds tests for zip root detection logic.
tests/rbmanager.Tests/SetupE2eTests.cs Adds E2E tests for rb setup including PATH and VC runtime flows.
tests/rbmanager.Tests/ResolveTests.cs Adds tests for version resolution behavior under redirected install root.
tests/rbmanager.Tests/rbmanager.Tests.csproj Updates project reference to the product under src/.
tests/rbmanager.Tests/PublishE2eTests.cs Adds opt-in tests against NativeAOT single-file published exe.
tests/rbmanager.Tests/ProgramLifecycleTests.cs Adds integration tests for install/list/use/uninstall lifecycle and trust hook injection.
tests/rbmanager.Tests/JunctionTests.cs Adds integration tests for NTFS junction creation behavior.
tests/rbmanager.Tests/DevkitVsTests.cs Adds opt-in tests that validate behavior against a real VS/MSVC installation.
tests/rbmanager.Tests/DevkitHelperTests.cs Adds unit tests for devkit helper functions (parsing/quoting/assignments).
tests/rbmanager.Tests/DevkitActivationTests.cs Adds integration tests for VS devcmd activation and enable/exec behavior.
tests/rbmanager.Tests/CurrentTargetTests.cs Adds tests for parsing current junction target behavior.
tests/rbmanager.Tests/CliE2eTests.cs Adds E2E tests validating CLI dispatch, usage, and exit codes.
src/rbmanager/VcRedist.cs Introduces VC++ redistributable detection, consent flow, download, signature verification, and elevation.
src/rbmanager/UserPath.cs Introduces PATH registry update logic with broadcast, plus test seam via env var.
src/rbmanager/rbmanager.csproj Updates embedded resource path due to repo layout move.
src/rbmanager/Program.cs Introduces CLI entrypoint and core command implementations (setup/install/list/use/uninstall/enable/exec).
src/rbmanager/Junction.cs Introduces junction creation helper using Win32 reparse points.
src/rbmanager/Devkit.cs Introduces devkit discovery/activation and rb enable / rb exec support.
src/rbmanager.Installer/rbmanager.Installer.wixproj Adds WiX SDK-style installer project configuration and build-time constants.
src/rbmanager.Installer/Package.wxs Updates MSI authoring to use constants for stable GUIDs and WiX SDK-style variables.
README.md Updates docs for new commands, build/test instructions, and repo/artifacts layout.
rbmanager.sln Updates solution to new paths and adds installer project.
global.json Pins .NET SDK feature band/version for consistent builds.
docs/upgrade-code.md Updates upgrade code documentation to reflect constants baked into the WiX project.
docs/devkit-enable.md Updates doc links/paths to match src/ layout.
Directory.Build.props Enables UseArtifactsOutput and routes WiX outputs under artifacts.
build-installer.ps1 Simplifies installer build script to publish then dotnet build the WiX project.
.gitignore Updates ignores to artifacts-based output layout.
.github/workflows/ci.yml Adds Windows CI to build solution and run full test suite.
.gitattributes Adds line-ending normalization policy and binary file handling.
.editorconfig Adds repo-wide formatting conventions.
.config/dotnet-tools.json Removes prior local tool pinning (WiX now via SDK package).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hsbt hsbt merged commit 0ea76b8 into master Jul 11, 2026
2 checks passed
@hsbt hsbt deleted the claude/rbmanager-csharp-layout-644d9f branch July 13, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants