dotnet / dotnet/runtime

ARM64 application running as x64 on ARM64 machine

Open
#123,259 2 comments 0 reactions 0 assignees View on GitHub
area-Meta question
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

I have created a very simple console application. I want to run it on a ARM64 machine. But When I am running it on this machine, it shows the Architecture as x64. Ideally it should have run as ARM64. There shouldn't be any emulation, as my target platform is ARM64. I have also installed the .net runtime ARM64 8.0.23. But when I run the app it expects to have the x64 runtime. But it runs when I install the .net runtime x64. Can I know the reason why is it so? why is it running as x64 not as ARM64? am I missing any other settings? I have also tried with Any CPU, but it also didn't help. Its Windows 11 22H2 maachine.

C# code

Console.WriteLine("Hello, World!");
Console.ReadKey();

csproj



Exe
net8.0
enable
enable
ARM64


But When I publish with Target runtime as win-arm64, and run on the machine, it shows the Architecture as ARM64.

[![enter image description here][1]][1]

[![enter image description here][2]][2]

[1]: https://i.sstatic.net/AJj5v208.png
[2]: https://i.sstatic.net/tCjvRYHy.png

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.