microsoft / microsoft/aspire

UnsafeAccessor for s_maximumTimeout will be broken in .NET 11 RC1

Open Beginner friendly
#19,119 2 comments 0 reactions 0 assignees View on GitHub
area-cli triage:bot-seen
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

PR https://github.com/dotnet/runtime/pull/130664 changes the field to `long s_maximumTimeoutTicks` instead of `TimeSpan s_maximumTimeout`.

Aspire currently access `s_maximumTimeout` via UnsafeAccessor: https://github.com/microsoft/aspire/blob/a50e553a8cc7d6f9adfcc4550f4ff7fb769dc0d4/src/Aspire.Cli/Utils/TransactionalAction.cs#L115

### Expected Behavior

Don't use reflection or unsafe accessor. The public API from https://github.com/dotnet/runtime/pull/71703 should be used.

### Steps To Reproduce

_No response_

### Exceptions (if any)

_No response_

### Aspire doctor output

_No response_

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with src/Aspire.Cli/Utils/TransactionalAction.cs at the UnsafeAccessor around line 115, then review the public API introduced by runtime PR 71703 and the field change in PR 130664. Replace the internal access with the public API and verify the Aspire CLI builds and its relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.