Repository navigation
Description
Description
A Native AOT console app that publishes fine for win-arm64 with .NET 11 preview 7 fails at the link step with .NET 11 RC 1. The linker can't apply its Cortex-A53 erratum 843419 fix-up to the object file ILCompiler produces.
Reproduction Steps
On a win-arm64 machine with SDK 11.0.100-rc.1.26425.128:
git clone https://github.com/jamescrosswell/dotnet-nativeaot-lnk1322-repro
cd dotnet-nativeaot-lnk1322-repro
dotnet publish apps/console-app -c Release -r win-arm64 -f net11.0 -p:SentryNative=false
apps/console-app is a dotnet new console app with PublishAot=true and a reference to Sentry 7.0.0-prerelease, which is included in the repo under packages/.
The repo's workflow runs this on a GitHub-hosted windows-11-arm runner: failing run.
Expected behavior
The app publishes successfully.
Actual behavior
console-app.obj : fatal error LNK1322: cannot avoid potential ARM hazard (Cortex-A53 MPCore processor bug #843419) in section 0x2; please consider using compiler option /Gy if it was not used
Microsoft.NETCore.Native.targets(425,5): error MSB3073: The command ""C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\bin\Hostarm64\arm64\link.exe" @"obj\Release\net11.0\win-arm64\native\link.rsp"" exited with code 1322.
Regression?
Yes. It worked with .NET 11 preview 7. Same runner image, same MSVC linker:
| App | SDK / ILCompiler | Result |
|---|---|---|
console-app |
11.0.100-rc.1.26425.128 / 11.0.0-rc.1.26425.128 |
LNK1322 (job) |
console-app |
11.0.100-preview.7.26381.103 / 11.0.0-preview.7.26381.103 |
links (job) |
Same code and package, assembly named IntegrationTestApp |
RC 1 | links (job) |
Known Workarounds
None we can apply. /Gy is a cl.exe option and doesn't apply to an object file produced by ILCompiler. Changing the code layout avoids the error (for example, renaming the assembly), but that isn't a practical workaround.
Configuration
- .NET SDK
11.0.100-rc.1.26425.128, ILCompiler11.0.0-rc.1.26425.128 - Target and host:
win-arm64 - MSVC
14.44.35207,bin\Hostarm64\arm64\link.exe(Visual Studio 2022 Enterprise) - GitHub Actions
windows-11-armrunner. It fails on images20260830.155.1and20260906.161.1.
Other information
- The failure depends on code layout. The same source and package built under a different assembly name links successfully. A hello-world app and a larger app with no packages (both in the repo) also link, which is why the repro includes a prerelease Sentry package.
- Object files are attached as workflow artifacts. Each has the ILCompiler object file,
link.rspand the publish log:- failing build:
console-app, RC 1 - passing: same code,
IntegrationTestAppname, RC 1 - passing:
console-app, preview 7 (object files for three sequential publishes)
- failing build:
- First seen in CI for getsentry/sentry-dotnet#5566.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
dotnet-policy-service commentedon Sep 14, 2026
Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.
MichalStrehovsky commentedon Sep 14, 2026
C:\Program Files\Microsoft Visual Studio\2022..NET 10+ is only supported with Visual Studio 2026.
This has been fixed in Visual Studio 2026: https://developercommunity.visualstudio.com/t/Remove-checking-for-and-fixing-Cortex-A/10905134
Try the failing build on the Visual Studio 2026 runner image
jamescrosswell commentedon Sep 14, 2026
Thanks @MichalStrehovsky - I'll try bumping the runner to one with VS 2026 (I think our runner still has 2022 installed). We're still using the
windows-11-armlabel, which doesn't look like it gets VS 2026 for another week.ci: run the win-arm64 .NET job on the Visual Studio 2026 runner image
feat: add support for .NET 11 RC 1 (#5566)