Skip to content

Setting RunAOTCompilation=true on non-wasm/non-mobile projects fails to build #77707

@radical

Description

@radical

If a simple console project, for example, is built with RunAOTCompilation=true then it fails like:

/usr/local/share/dotnet/sdk/7.0.200-preview.22521.7/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5):

error NETSDK1147: To build this project, the following workloads must be installed: macos [/private/tmp/c/c.csproj]
error NETSDK1147: To install these workloads, run the following command: dotnet workload restore [/private/tmp/c/c.csproj]

And this is because the MonoAOTCompiler.Task is imported with:

https://github.com/radical/runtime/blob/31599a4e9f8b42c4872d7f7446b14d213f75104b/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.targets.in#L57-L58

cc @lewing @steveisok

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions