Skip to content

Include shared component packages in SB artifacts - #1983

Merged
mthalman merged 2 commits into
dotnet:mainfrom
mthalman:2xx-shared-component-artifacts
Aug 21, 2025
Merged

mthalman merged 2 commits into
dotnet:mainfrom
mthalman:2xx-shared-component-artifacts

Conversation

@mthalman

Copy link
Copy Markdown
Member

Contributes to #1011

In a non-1xx build, the stage 2 source-only build fails in the build of source-build-reference-packages with errors like the following:
/__w/1/s/src/source-build-reference-packages/src/targetPacks/ILsrc/microsoft.netcore.app.ref/6.0.0/Microsoft.NETCore.App.Ref.6.0.0.csproj error NU1603: Microsoft.NETCore.App.Ref.6.0.0 depends on runtime.centos.10-x64.Microsoft.NETCore.ILAsm (>= 10.0.0-preview.7.25377.103) but runtime.centos.10-x64.Microsoft.NETCore.ILAsm 10.0.0-preview.7.25377.103 was not found. runtime.centos.10-x64.Microsoft.NETCore.ILAsm 10.0.0-rc.1.25405.108 was resolved instead. [/__w/1/s/.dotnet/sdk/10.0.200-rc.1.25408.102/NuGet.targets]

The issue here is that a dependency to runtime.centos.10-x64.Microsoft.NETCore.ILAsm is being defined targeting the version that is defined directly in the repo's MicrosoftNETCoreILAsmVersion property (in this case 10.0.0-preview.7.25377.103. It's not being overridden with the version that was produced by the stage 1 build (in this case 10.0.0-rc.1.25405.108). It doesn't get overridden because that package is not listed in the versions props file that exists in the SB artifacts tarball produced by the stage 1 build. In fact, none of the packages which originate from the shared components are listed in there.

The fix is to ensure that those properties are written. This also applies to the VersionManifest.xml file which also needs to accurately reflect this state as there are dependencies on that file as well.

We need both the PSB and shared components because PSB may have not been
SB and so we need the portable packages it has which are compatible with
the SDK being used.

In the case of stage 1, we want MicrosoftNETCoreILAsmVersion to not be
lifted to the version in shared components. But in stage 2, we do.
Comment thread eng/PublishSourceBuild.props Resolved
@mthalman
mthalman merged commit 5d686aa into dotnet:main Aug 21, 2025
@mthalman
mthalman deleted the 2xx-shared-component-artifacts branch August 21, 2025 18:42
@mthalman

Copy link
Copy Markdown
Member Author

/backport to release/10.0.1xx

@github-actions

Copy link
Copy Markdown
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.

2 participants