Skip to content

Conversation

@mthalman
Copy link
Member

@mthalman mthalman commented Aug 5, 2025

Offline source-only builds will fail in a non-1xx branch with the following error:

  /__w/1/s/src/sdk/src/Layout/redist/redist.csproj : error NU1102: Unable to find package Microsoft.NETCore.Platforms with version (= 10.0.0-preview.7.25377.103) [/__w/1/s/src/sdk/source-build.slnf]

The version that's referenced here is the "live" version of Microsoft.NETCore.Platforms that comes from the shared components (1xx build artifacts). The problem is that there's no package source mapping defined for Microsoft.NETCore.Platforms from the shared components source. There's only a mapping defined for it from SBRP.

This behavior is due to the logic in the UpdateNuGetConfigPackageSourcesMappings task. To understand what's happening we first need to look at the package versions that exist in from the shared components:

  • 1.1.0
  • 5.0.0
  • 10.0.0-preview.7.25377.103

And the SBRP repo has these versions:

  • 1.1.0
  • 5.0.0

Since SBRP is being built in the non-1xx branch, the UpdateNuGetConfigPackageSourcesMappings task will classify those package versions as "current" and give them priority. This means that it will not create a mapping for any of the other sources if a package exists in the "current" source. Since one of the versions of Microsoft.NETCore.Platforms from the shared components matches the same version that exists in SBRP, it omits out the mapping of Microsoft.NETCore.Platforms for the shared component source (a mapping is done on just a package name basis, not version basis). So we miss out on having access to the version of Microsoft.NETCore.Platforms that was produced by the 1xx build.

The solution is to strip out the SBRP packages from the shared components feed. They are not needed because the non-1xx branch builds its own SBRP. This is done in a general manner by stripping out all bootstrapped repos which includes arcade and SBRP.

@MichaelSimons
Copy link
Member

I think this could be solved with dotnet/source-build-reference-packages#1317. That has other benefits as well. IMO, we should investigate fixing that in-lieu of this solution.

@mthalman
Copy link
Member Author

@MichaelSimons - Friendly ping to review this again after we determined that dotnet/source-build-reference-packages#1317 does not solve this.

@mthalman mthalman enabled auto-merge (squash) August 18, 2025 12:54
@mthalman mthalman requested a review from ViktorHofer August 18, 2025 18:39
@mthalman mthalman merged commit 5cd1e72 into dotnet:main Aug 18, 2025
11 checks passed
@mthalman mthalman deleted the 2xx-sb-offline branch August 18, 2025 20:56
@mthalman
Copy link
Member Author

/backport to release/10.0.1xx

@github-actions
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants