Build the app separately from libraries and tests to drop the -m:1 build workaround#609
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the -m:1 single-node MSBuild workaround by eliminating the underlying parallel-build PDB copy race: it switches the repo to embedded debug symbols (so no separate .pdb files need to be copied) and enables CI-only deterministic build behavior via ContinuousIntegrationBuild.
Changes:
- Set repo-wide
<DebugType>embedded</DebugType>to avoid parallel-build.pdbcopy races. - Enable
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>when running on Azure Pipelines (TF_BUILD) or GitHub Actions (GITHUB_ACTIONS). - Update PR CI workflow to build without
-m:1, allowing parallel builds again.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Directory.Build.props | Sets embedded debug symbols repo-wide and enables CI-only deterministic builds via ContinuousIntegrationBuild. |
| .github/workflows/PullRequest.yml | Drops the -m:1 build flag so CI uses parallel MSBuild again. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3a62c0a to
d675fd0
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
tests/Integration/EventLogExpert.EventDbTool.IntegrationTests/EventLogExpert.EventDbTool.IntegrationTests.csproj:1
- This change removes the EventDbTool integration test project, but repo tooling still expects it to exist:
compose.ymldefines aneventdbtoolservice that runstests/Integration/EventLogExpert.EventDbTool.IntegrationTests/EventLogExpert.EventDbTool.IntegrationTests.csproj, andtests/Integration/README.mddocuments running that suite via Docker Compose. With the project deleted, those local workflows will fail (missing csproj). If the suite is being retired, the Compose + docs (and any scripts) should be updated in the same PR; otherwise the project should be restored.
…ainst arch mismatch
704a1b9 to
5c6372e
Compare
Summary
This branch unblocks native multi-architecture (x64 + ARM64) builds with three related changes:
-m:1(single-process MSBuild) workaround from the PR build by fixing the parallel-build race it masked.1. Drop the
-m:1build workaroundWhen the whole solution builds in parallel, the MAUI Windows app evaluates the shared libs with a different build dimension (it resolves
win-x64) than the tests (AnyCPU), so MSBuild compiles the same lib in two worker processes into the sameobj-> intermittentCSC CS2012("dll being used by another process") andMSB3030("could not copy pdb").-m:1masked it by serializing (slow).Fix: build the MAUI app separately from the libraries and tests.
LibrariesAndTests.slnfsolution filter (all projects except the app) builds in parallel - uniformAnyCPU, no divergence, no race.This is the documented MAUI "build the app separately" pattern.
-graphBuildwas ruled out (it crashes the WinUI XAML compiler withMSB4166).2. Native ARM64 build support
The C++/WinRT shell extension (
EventLogExpert.ExplorerExtensionNative.vcxproj) was x64-only. This adds:Debug|ARM64+Release|ARM64ProjectConfigurations mirroring the x64 ones (x64 byte-identical;CETCompatomitted on ARM64 as it is x64/Intel-only).Microsoft.Windows.SDK.CPP.arm64inpackages.configat the same version as the.x64package, with an$(Platform)-conditional import.EventLogExpert.csproj: awin-arm64 -> ARM64native-platform mapping and a per-arch vswhere requirement that addsVC.Tools.ARM64only on the ARM64 pass.A throwaway CI spike confirmed the native extension cross-compiles to ARM64 on the
windows-2022toolchain (dumpbinreported anAA64machine type).3. Architecture-correct native-platform selection
ExplorerExtensionNativePlatformwas derived only fromRuntimeIdentifier, so a build that setsPlatform=ARM64with no RID (e.g. a Visual Studio ARM64 MSIX build) would package an arm64 ElevationHelper next to an x64 native DLL in one MSIX. The derivation now also honorsPlatform=ARM64(matching the existing_ElevationHelperRidprecedence: RID wins, thenPlatform=ARM64, then x64), and a build-time consistency guard fails the build if the native platform and the ElevationHelper RID ever disagree on architecture.Cleanup: remove empty placeholder integration test suites
This also removes three integration test projects that contained no tests, only scaffolding (auto-generated
GlobalUsings/ xunit entry point, and in one case an unused fixture):EventLogExpert.EventDbTool.IntegrationTests,EventLogExpert.Filtering.IntegrationTests, andEventLogExpert.UI.IntegrationTests. They are dead scaffolding - the UI assembly was renamed to Runtime (soEventLogExpert.Runtime.IntegrationTestscovers it), and the EventDbTool/Filtering integration coverage lives in the Runtime / DatabaseTools / Provider.Database integration suites. Nothing references them; they are removed fromEventLogExpert.slnxandLibrariesAndTests.slnf. No test coverage is lost (there were no tests to lose).Validation
dumpbinreported anAA64machine type).dotnet msbuild -getPropertytruth table across the (RID, Platform) matrix; the consistency guard fires only on a genuine mismatch.windows-2022CI validates the managed parallel build and all tests. It does NOT build the native C++/WinRT extension or the MSIX package: theBuild appstep is a plaindotnet build(noWindowsPackageType=MSIX), so theBuildExplorerExtensionNativetarget does not run. The native/MSIX path is validated separately by the release pipeline and the ARM64 build spike.Notes
LibrariesAndTests.slnf; if forgotten, the test step fails loudly (dotnet test --no-buildon an unbuilt project), so it is self-correcting.-m:1from the OneBranch release pipeline build step; it lands after this merges.