Skip to content

Drop the LibrariesAndTests.slnf split for a one-pass managed build#613

Merged
jschick04 merged 1 commit into
jschick/embed-symbols-drop-m1from
jschick/drop-slnf
Jun 21, 2026
Merged

Drop the LibrariesAndTests.slnf split for a one-pass managed build#613
jschick04 merged 1 commit into
jschick/embed-symbols-drop-m1from
jschick/drop-slnf

Conversation

@jschick04

Copy link
Copy Markdown
Collaborator

What

Replaces the LibrariesAndTests.slnf build split (and the -m:1 workaround) with a single one-pass dotnet build EventLogExpert.slnx. Stacked on #609.

Why

#609 introduced the slnf split so CI could build the libraries+tests separately from the MAUI app, working around a parallel-build race: the RID-qualified app compiles the shared libraries as win-x64 while the tests compile them AnyCPU, so each library is built twice concurrently and races on its obj/bin (CS2012 / MSB3030). The slnf is a maintenance burden (it must list every project). This PR removes the race at the source so the whole solution builds in one parallel pass - no slnf to maintain, matching common .NET practice (PowerToys / eShop / CommunityToolkit build the whole solution/filter in parallel; none use -m:1).

This supersedes #609's "build the app separately" approach. Net effect once both land: one-pass build, no slnf, no -m:1.

How

  1. Directory.Build.targets (new) - strips RuntimeIdentifier;SelfContained from every executable's ProjectReference items (GlobalPropertiesToRemove), so the shared libraries build AnyCPU exactly once regardless of the app's RID. The libraries get no RID (the SDK-recommended pattern - pinning a RID on libraries is an anti-pattern); the app keeps its own RID for its per-arch publish -r win-x64/win-arm64 output.
  2. Directory.Build.props - global DebugType=embedded, so there is no separate .pdb for dependent projects to race on copying (the second parallel race). dotnet/eShop and CommunityToolkit/Windows use the same setting for the same reason; consistent with this repo's existing helper executable.
  3. PullRequest.yml - one dotnet build EventLogExpert.slnx -p:WindowsPackageType=None (managed-only, matching the prior PR-CI coverage; the native shell extension + MSIX remain a release-pipeline concern). Drops the slnf step, the separate "Build app" step, and the now-contradictory "Don't recombine" comment.
  4. Deletes LibrariesAndTests.slnf (its only consumer was the rewritten workflow step).

Validation

  • Whole-solution parallel build (-p:WindowsPackageType=None): 0 warnings / 0 errors.
  • Every shared library (incl. the Razor EventLogExpert.UI) builds AnyCPU (no win-x64 lib output); the app builds win-x64. 0 separate .pdb files.
  • Unit tests pass against the one-pass build (--no-build): Logging, DatabaseTools, Runtime (1629), UI (958).
  • ElevationHelper self-contained publish (the MSIX path) still produces a working bundle with e_sqlite3.dll + the AnyCPU libraries.
  • An earlier validation spike (RID-pin variant) passed CI end-to-end on base Build the app separately from libraries and tests to drop the -m:1 build workaround #609, including the container integration tests.

Out of scope

The separate EventLogExpert-ADO release-pipeline repo still passes -m:1 (its build.yml + two package.yml publish tasks) - a follow-up in that repo. The MSIX-only ElevationHelper publish inside the app csproj retains its own -m:1 (single self-contained publish, not the build-graph one).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 removes the LibrariesAndTests.slnf split introduced in #609 and restores a single, parallel, whole-solution CI build by preventing RID/self-contained properties from flowing from executable projects into referenced libraries (eliminating the AnyCPU vs win-x64 dual-build race) and by embedding PDBs to avoid parallel copy races.

Changes:

  • Add Directory.Build.targets to strip RuntimeIdentifier/SelfContained from ProjectReference builds originating from executable projects.
  • Set DebugType=embedded globally in Directory.Build.props to avoid .pdb copy contention under parallel builds.
  • Simplify PR CI to a single dotnet build EventLogExpert.slnx ... -p:WindowsPackageType=None step and delete LibrariesAndTests.slnf.

Reviewed changes

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

File Description
LibrariesAndTests.slnf Removes the solution filter now that CI no longer depends on a split build.
Directory.Build.targets Prevents RID/self-contained properties from propagating to referenced projects when building executables, addressing the root parallel-build race.
Directory.Build.props Embeds debug symbols across the repo to avoid parallel .pdb copy races.
.github/workflows/PullRequest.yml Switches PR validation to one-pass whole-solution build and removes the separate app build step.

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

@jschick04 jschick04 marked this pull request as ready for review June 21, 2026 03:35
@jschick04 jschick04 requested a review from a team as a code owner June 21, 2026 03:35
@jschick04 jschick04 merged commit adae80f into jschick/embed-symbols-drop-m1 Jun 21, 2026
2 checks passed
@jschick04 jschick04 deleted the jschick/drop-slnf branch June 21, 2026 03:35
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