Skip to content

NETSDK1204 error during dotnet clean on macOS when AoT enabled #36960

@martincostello

Description

@martincostello

Describe the bug

Running dotnet clean as part of the Polly CI fails on macOS when PublishAot=true is specified in a project file.

To Reproduce

Run build.ps1 on macOS after cloning this commit: App-vNext/Polly@58c807e

I haven't been able to reproduce this in a simpler project: martincostello/dotnet-8-samples#10

I also don't have access to a macOS computer (I have a Windows laptop), so I can't test this out locally to try and get a more minimal repro.

Exceptions (if any)

Workflow error logs from App-vNext/Polly#1800:

Error: /Users/runner/.dotnet/sdk/8.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1204: Ahead-of-time compilation is not supported on the current platform 'osx-x64'. [/Users/runner/work/Polly/Polly/test/Polly.AotTest/Polly.AotTest.csproj]

Further technical details

.NET 8.1.00 SDK running on GitHub Action's macos-latest runner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-NativeAOTNative AOT compilationuntriagedRequest triage from a team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions