From cd0909900c14c135f25ed99e8d68b531d86daa3f Mon Sep 17 00:00:00 2001 From: jschick04 Date: Sat, 20 Jun 2026 22:30:38 -0500 Subject: [PATCH] Build the solution in one pass and drop the slnf build split --- .github/workflows/PullRequest.yml | 11 ++------- Directory.Build.props | 1 + Directory.Build.targets | 7 ++++++ LibrariesAndTests.slnf | 37 ------------------------------- 4 files changed, 10 insertions(+), 46 deletions(-) create mode 100644 Directory.Build.targets delete mode 100644 LibrariesAndTests.slnf diff --git a/.github/workflows/PullRequest.yml b/.github/workflows/PullRequest.yml index 9919d5ab5..bc2f18fcb 100644 --- a/.github/workflows/PullRequest.yml +++ b/.github/workflows/PullRequest.yml @@ -25,13 +25,8 @@ jobs: run: dotnet workload restore EventLogExpert.slnx - name: Restore dependencies run: dotnet restore EventLogExpert.slnx - # Build the MAUI app in its own step (after the tests), NOT as one solution build. - # Building the app together with the test projects makes MSBuild compile the shared - # libraries twice concurrently - the app resolves a Windows RID (win-x64) while the tests - # are AnyCPU - which races on the libs' obj/bin (CS2012 / MSB3030). The old -m:1 flag masked - # this by serializing; this split fixes the root cause. Don't recombine into one slnx build. - - name: Build libraries and tests - run: dotnet build LibrariesAndTests.slnf --no-restore -c Release -p:PublishReadyToRun=false + - name: Build + run: dotnet build EventLogExpert.slnx --no-restore -c Release -p:PublishReadyToRun=false -p:WindowsPackageType=None - name: Test (unit) shell: pwsh run: | @@ -56,5 +51,3 @@ jobs: if ($LASTEXITCODE -ne 0) { $failed = $true } } if ($failed) { throw 'One or more integration test projects failed.' } - - name: Build app - run: dotnet build src/EventLogExpert/EventLogExpert.csproj --no-restore -c Release -p:PublishReadyToRun=false diff --git a/Directory.Build.props b/Directory.Build.props index 64a91cc37..37a2d8332 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,6 +3,7 @@ enable enable true + embedded $(NoWarn);CsWinRT1030 diff --git a/Directory.Build.targets b/Directory.Build.targets new file mode 100644 index 000000000..b7fb0e0b0 --- /dev/null +++ b/Directory.Build.targets @@ -0,0 +1,7 @@ + + + + $(GlobalPropertiesToRemoveFromProjectReferences);RuntimeIdentifier;SelfContained + + + diff --git a/LibrariesAndTests.slnf b/LibrariesAndTests.slnf deleted file mode 100644 index 4a8714da7..000000000 --- a/LibrariesAndTests.slnf +++ /dev/null @@ -1,37 +0,0 @@ -{ - "solution": { - "path": "EventLogExpert.slnx", - "projects": [ - "src\\EventLogExpert.DatabaseTools\\EventLogExpert.DatabaseTools.csproj", - "src\\EventLogExpert.ElevationHelper\\EventLogExpert.ElevationHelper.csproj", - "src\\EventLogExpert.EventDbTool\\EventLogExpert.EventDbTool.csproj", - "src\\EventLogExpert.Eventing\\EventLogExpert.Eventing.csproj", - "src\\EventLogExpert.Filtering\\EventLogExpert.Filtering.csproj", - "src\\EventLogExpert.Logging\\EventLogExpert.Logging.csproj", - "src\\EventLogExpert.Provider\\EventLogExpert.Provider.csproj", - "src\\EventLogExpert.Provider.Database\\EventLogExpert.Provider.Database.csproj", - "src\\EventLogExpert.Runtime\\EventLogExpert.Runtime.csproj", - "src\\EventLogExpert.Scenarios\\EventLogExpert.Scenarios.csproj", - "src\\EventLogExpert.UI\\EventLogExpert.UI.csproj", - "src\\EventLogExpert.WindowsPlatform\\EventLogExpert.WindowsPlatform.csproj", - "tests\\Integration\\EventLogExpert.DatabaseTools.IntegrationTests\\EventLogExpert.DatabaseTools.IntegrationTests.csproj", - "tests\\Integration\\EventLogExpert.ElevationHelper.IntegrationTests\\EventLogExpert.ElevationHelper.IntegrationTests.csproj", - "tests\\Integration\\EventLogExpert.Eventing.IntegrationTests\\EventLogExpert.Eventing.IntegrationTests.csproj", - "tests\\Integration\\EventLogExpert.Provider.Database.IntegrationTests\\EventLogExpert.Provider.Database.IntegrationTests.csproj", - "tests\\Integration\\EventLogExpert.Runtime.IntegrationTests\\EventLogExpert.Runtime.IntegrationTests.csproj", - "tests\\Shared\\EventLogExpert.Eventing.TestUtils\\EventLogExpert.Eventing.TestUtils.csproj", - "tests\\Shared\\EventLogExpert.Filtering.TestUtils\\EventLogExpert.Filtering.TestUtils.csproj", - "tests\\Unit\\EventLogExpert.DatabaseTools.Tests\\EventLogExpert.DatabaseTools.Tests.csproj", - "tests\\Unit\\EventLogExpert.EventDbTool.Tests\\EventLogExpert.EventDbTool.Tests.csproj", - "tests\\Unit\\EventLogExpert.Eventing.Tests\\EventLogExpert.Eventing.Tests.csproj", - "tests\\Unit\\EventLogExpert.Filtering.Tests\\EventLogExpert.Filtering.Tests.csproj", - "tests\\Unit\\EventLogExpert.Logging.Tests\\EventLogExpert.Logging.Tests.csproj", - "tests\\Unit\\EventLogExpert.Provider.Database.Tests\\EventLogExpert.Provider.Database.Tests.csproj", - "tests\\Unit\\EventLogExpert.Provider.Tests\\EventLogExpert.Provider.Tests.csproj", - "tests\\Unit\\EventLogExpert.Runtime.Tests\\EventLogExpert.Runtime.Tests.csproj", - "tests\\Unit\\EventLogExpert.Scenarios.Tests\\EventLogExpert.Scenarios.Tests.csproj", - "tests\\Unit\\EventLogExpert.UI.Tests\\EventLogExpert.UI.Tests.csproj", - "tests\\Unit\\EventLogExpert.Windows.Tests\\EventLogExpert.Windows.Tests.csproj" - ] - } -}