Skip to content

Fix issue where SDKs might not get copied to layout - #55102

Merged
dsplaisted merged 1 commit into
mainfrom
dsplaisted/fix-sdk-layout-content-race
Jul 1, 2026
Merged

dsplaisted merged 1 commit into
mainfrom
dsplaisted/fix-sdk-layout-content-race

Conversation

@dsplaisted

Copy link
Copy Markdown
Member

Should fix at least some instances of #51530

Copilot AI review requested due to automatic review settings July 1, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses intermittent downstream restore/build failures (“Could not resolve SDK”, #51530) by ensuring in-repo SDK content (notably Sdk\Sdk.props) is produced before the redist layout copies SDKs into the final layout.

Changes:

  • Add explicit ProjectReference edges from redist.csproj to the Razor/StaticWebAssets/BlazorWasm/Wasm Tasks projects so their outer builds (which emit SDK layout content) run before layout generation.
  • Add explicit <Error> checks in PublishNetSdks to fail fast if expected SDK content (e.g., Sdk\Sdk.props) was not produced into artifacts/bin/.../Sdks/<SdkName> prior to copying.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Layout/redist/targets/GenerateLayout.targets Adds fail-fast checks to detect missing in-repo SDK content before copying SDKs into the layout.
src/Layout/redist/redist.csproj Adds project reference build-ordering edges so SDK content-producing outer builds complete before layout copy.

@dsplaisted
dsplaisted enabled auto-merge July 1, 2026 17:26
@dsplaisted
dsplaisted merged commit dc40ff8 into main Jul 1, 2026
27 checks passed
@dsplaisted
dsplaisted deleted the dsplaisted/fix-sdk-layout-content-race branch July 1, 2026 17:42
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants