Fix Windows CI by scoping IntermediateOutputPath per framework - #396
Merged
Conversation
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 <noreply@anthropic.com>
thejambi
marked this pull request as ready for review
August 14, 2026 17:21
Contributor
|
This comment is unnecessary, no one will come to this file and go 'huh, why is this property that I don't know about mssing?' |
Contributor
Author
|
Previously, jasonleenaylor (Jason Naylor) wrote…
Comments have been removed. |
jasonleenaylor
approved these changes
Aug 14, 2026
jasonleenaylor
left a comment
Contributor
There was a problem hiding this comment.
@jasonleenaylor reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on thejambi).
thejambi
added a commit
that referenced
this pull request
Aug 14, 2026
* 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. * Remove comments Co-Authored-By: Zachary Burnham <zachary_burnham@sil.org> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
This change is