Repository navigation
Revert sharedfx.targets property differentiation from #6697 - #6752
Merged
Merged
Conversation
Reverts the _GettingFilesForPackage/_GettingFilesForPublish property additions in sharedfx.targets and restores _PublishingToLayout in aspnetcore sfxproj. These changes caused MSBuild to schedule the nested calls as separate project instances, leading to concurrent writes to the same deps.json file — producing deterministic file-lock failures on all main rolling builds (6/6 failed in 24h). Keeps the PlatformManifestFileEntry addition for Microsoft.NETCore.App.Runtime.CoreCLR.r2r.dylib (real bug fix). The original MSB4006 intermittent circular dependency is tracked at dotnet/msbuild#13599 and needs a fix that doesn't create concurrent project instances. Partial revert of #6697. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR partially reverts #6697 to address deterministic file-lock build failures caused by MSBuild scheduling nested self-builds as distinct project instances (due to differing global properties), allowing concurrent execution that writes the same shared-framework .deps.json outputs.
Changes:
- Revert
_GettingFilesForPackage/_GettingFilesForPublishglobal property differentiation on nested self-<MSBuild>calls insharedfx.targetsto prevent concurrent duplicate project instances. - Restore
_PublishingToLayout=trueon the aspnetcoreMicrosoft.AspNetCore.App.Runtime.sfxprojnested publish-to-layout call (to retain the circular-dependency workaround for that scenario).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/aspnetcore/src/Framework/App.Runtime/src/Microsoft.AspNetCore.App.Runtime.sfxproj | Re-adds _PublishingToLayout=true to the nested publish MSBuild invocation to differentiate global properties and avoid intermittent circular dependency scenarios. |
| src/arcade/src/Microsoft.DotNet.SharedFramework.Sdk/targets/sharedfx.targets | Removes the dummy differentiating properties from nested self-builds to avoid MSBuild scheduling concurrent project instances that contend on shared outputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wtgodbe
approved these changes
May 21, 2026
Member
Author
|
/backport to release/11.0-preview5 |
Contributor
|
Started backporting to |
Contributor
|
@lewing an error occurred while backporting to |
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.
Summary
Partial revert of #6697 to fix the deterministic file-lock build failures on
main(6/6 internal rolling builds failed in the last 24h).Problem
PR #6697 added
_GettingFilesForPackage=true/_GettingFilesForPublish=trueproperties to nested<MSBuild>calls insharedfx.targetsto fix an intermittent MSB4006 circular dependency. However, this caused MSBuild's scheduler to treat the nested calls as separate project instances (different global properties = different cache entries), allowing them to run concurrently on different worker nodes. Both instances execute_GenerateSharedFrameworkDepsFileand write to the same.deps.jsonfile withFileShare.None, producing deterministic file-lock crashes.See: #6697 (comment)
What this PR does
_GettingFilesForPackage/_GettingFilesForPublishproperty additions insharedfx.targets_PublishingToLayout=truein aspnetcore'sMicrosoft.AspNetCore.App.Runtime.sfxproj(was removed by Fix intermittent circular dependency in sharedfx.targets (MSB4006) #6697)PlatformManifestFileEntryaddition forMicrosoft.NETCore.App.Runtime.CoreCLR.r2r.dylib(that was a real bug fix)Trade-off
The intermittent MSB4006 (false circular dependency) may return, but it's far less damaging than 100% deterministic build failure. The underlying MSBuild scheduling issue is tracked at dotnet/msbuild#13599.
cc @wtgodbe @dotnet/dnceng