From 5977839b7e39615a8f5e894dc1c8baf1519260e4 Mon Sep 17 00:00:00 2001 From: Zachary Burnham Date: Fri, 14 Aug 2026 13:07:29 -0400 Subject: [PATCH 1/2] Fix Windows CI by scoping IntermediateOutputPath per framework Directory.Build.props sets AppendTargetFrameworkToOutputPath=false so that OutputPath can place output under artifacts/$(Configuration)/$(TargetFramework) itself. That flag also strips $(TargetFramework) from IntermediateOutputPath, so all three target frameworks of a multi-targeted project shared a single obj folder - including the reference assembly under obj/ref. Whichever framework built last owned it. ProjectReference resolution reads that reference assembly, so the netstandard2.0 compile of SIL.LCModel could be handed the net8.0 build of SIL.LCModel.Core: CSC : error CS1705: Assembly 'SIL.LCModel.Core' ... uses 'System.Drawing.Primitives, Version=8.0.0.0' which has a higher version than referenced assembly 'System.Drawing.Primitives, Version=4.0.2.0' [SIL.LCModel.csproj::TargetFramework=netstandard2.0] Build ordering decided whether this hit, which is why Windows failed while Linux stayed green. #394 removed the OutDir override in SIL.LCModel and fixed the bin side of the same problem; the intermediate side kept sharing one path. Set IntermediateOutputPath to obj/$(Configuration)/$(TargetFramework)/ in Directory.Build.props, and drop the obj/x86/$(Configuration)/ override in SIL.LCModel.Core.csproj that predates multi-targeting and now conflicts with it - Platform is Any CPU repo-wide, so the x86 segment bought nothing. OutputPath and the artifacts layout are unchanged. Co-Authored-By: Claude Opus 5 --- Directory.Build.props | 8 ++++++++ src/SIL.LCModel.Core/SIL.LCModel.Core.csproj | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 6a122c7d..0b547c64 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,6 +14,14 @@ Debug $(MSBuildThisFileDirectory)artifacts/$(Configuration)/$(TargetFramework) false + + obj/$(Configuration)/$(TargetFramework)/ $(MSBuildThisFileDirectory)/artifacts NU1605;CS8002 true diff --git a/src/SIL.LCModel.Core/SIL.LCModel.Core.csproj b/src/SIL.LCModel.Core/SIL.LCModel.Core.csproj index 5043a6fd..d9d43bc8 100644 --- a/src/SIL.LCModel.Core/SIL.LCModel.Core.csproj +++ b/src/SIL.LCModel.Core/SIL.LCModel.Core.csproj @@ -86,7 +86,10 @@ SIL.LCModel.Core provides a base library with core functionality. - obj/x86/$(Configuration)/ + dotnet build "$(MSBuildBinPath)\msbuild.exe" msbuild From a8af51e46f1ea673c4e7e1ee0efe080de784f7ea Mon Sep 17 00:00:00 2001 From: Zachary Burnham Date: Fri, 14 Aug 2026 14:19:18 -0400 Subject: [PATCH 2/2] Remove comments --- Directory.Build.props | 7 ------- src/SIL.LCModel.Core/SIL.LCModel.Core.csproj | 4 ---- 2 files changed, 11 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 0b547c64..d2167649 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,13 +14,6 @@ Debug $(MSBuildThisFileDirectory)artifacts/$(Configuration)/$(TargetFramework) false - obj/$(Configuration)/$(TargetFramework)/ $(MSBuildThisFileDirectory)/artifacts NU1605;CS8002 diff --git a/src/SIL.LCModel.Core/SIL.LCModel.Core.csproj b/src/SIL.LCModel.Core/SIL.LCModel.Core.csproj index d9d43bc8..d74fa856 100644 --- a/src/SIL.LCModel.Core/SIL.LCModel.Core.csproj +++ b/src/SIL.LCModel.Core/SIL.LCModel.Core.csproj @@ -86,10 +86,6 @@ SIL.LCModel.Core provides a base library with core functionality. - dotnet build "$(MSBuildBinPath)\msbuild.exe" msbuild