dotnet / dotnet/arcade

Arcade SDK InstallDotNetCore fails under .NET Framework MSBuild after System.Memory 4.6.3 update

Open
#17,103 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
729
Forks
397
Avg merge
3d 15m
Merged PRs (30d)
149

Description

- [x] This issue is blocking
This blocks dotnet/msbuild#14332 from consuming Arcade build `20260708.3`. All affected Windows full-framework bootstrap jobs fail before tests start.

Related to dotnet/msbuild#14332

### Context

`Microsoft.DotNet.Arcade.Sdk` version `10.0.0-beta.26358.3` fails when its `InstallDotNetCore` task runs under full-framework MSBuild. The package contains an inconsistent .NET Framework dependency set:

- `Microsoft.DotNet.Arcade.Sdk.dll` references `System.Memory, Version=4.0.5.0`.
- The bundled `System.Text.Json.dll` remains version `8.0.0.5` and references `System.Memory, Version=4.0.1.2`.

When `InstallDotNetCore.Execute()` calls `JsonDocument.Parse(bytes)`, method resolution fails in the isolated .NET Framework task AppDomain:

> `System.MissingMethodException: Method not found: 'System.Text.Json.JsonDocument System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory, System.Text.Json.JsonDocumentOptions)'`

### Copilot Investigation
The mismatch was introduced by dotnet/arcade#17060, which changed `SystemMemoryVersion` from `4.5.5` to `4.6.3`. The affected package was then flowed into dotnet/msbuild#14332. MSBuild itself contains no related code changes.

The Arcade package needs a coherent `System.Memory`/`System.Text.Json` dependency set for .NET Framework tasks. One possible approach is to keep the newer `System.Memory` dependency scoped to `Microsoft.DotNet.RemoteExecutor` rather than applying it to all Arcade projects.

- dotnet/msbuild build 1505477 fails in `Windows Full` during `cibuild_bootstrapped_msbuild.cmd`.
- dotnet/msbuild build 1505478 fails identically in the Windows quarantined-test job.
- Linux, macOS, Windows Core, and non-bootstrap Windows jobs pass.
- Package inspection confirmed that `10.0.0-beta.26324.4` had both the Arcade task and `System.Text.Json` referencing `System.Memory` `4.0.1.2`.
- Package inspection confirmed that `10.0.0-beta.26358.3` changed only the Arcade task reference to `System.Memory` `4.0.5.0`; the bundled `System.Text.Json` binary remained unchanged.
- No corrective change has been tested.

Contributor guide

Open the contributing guide

Research direction

Start with Microsoft.DotNet.Arcade.Sdk and the InstallDotNetCore.Execute() path, then inspect the packaged System.Memory and System.Text.Json dependency versions. Reproduce the failure in the Windows full-framework bootstrap job and compare it with the passing package version 10.0.0-beta.26324.4. Done means the task runs under full-framework MSBuild and the affected Windows bootstrap jobs pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.