dotnet / dotnet/macios

Cannot nativeaot compile hello world

Open
#24,447 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 12h
Merged PRs (30d)
123

Description

### Apple platform

macOS

### Framework version

net10.0-*

### Affected platform version

net10.0-macos,xcode26.1.1

### Description

`Restore complete (0.2s)
test_macos net10.0-macos osx-x64 failed with 4 error(s) (0.7s) → bin/Release/net10.0-macos/osx-x64/test_macos.dll
ILLink : MacOSX error IL7000: An error occurred while executing the custom linker steps. Please review the build log for more information.
ILLINK : error MM0099: No platform assembly!
ILLINK : error MM2430: The linker step 'ManagedRegistrar' failed during processing: No platform assembly!
/Users/dvu/.nuget/packages/microsoft.net.illink.tasks/10.0.1/build/Microsoft.NET.ILLink.targets(103,5): error NETSDK1144: Optimizing assemblies for size failed.`

```using System;

class MainClass {
static void Main() {
Console.WriteLine("Hello World!");
}
}
```

with
```


Exe
net10.0-macos
com.example.testmacos
true
true

```

workload installed:
macos 26.1.10502/10.0.100 SDK 10.0.100
xcode installed:
sudo xcode-select -s /Applications/Xcode-26.1.1.app/Contents/Developer
dotnet runtimes:
Microsoft.AspNetCore.App 10.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

What am I doing wrong?

### Steps to Reproduce

1. create a new hello world
2. try to compile nativeaot with net10.0-macos

### Did you find any workaround?

_No response_

### Build logs

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.