Your host architecture is x64 rather than ARM64 - are you sure you installed the correct installer?:
https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-7.0.402-macos-x64-installer
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I had the wrong version of .NET installed and removed the .NET SDKs and .NET runtimes.
When I run dotnet --info
to confirm, I get this output:
Host:
Version: 7.0.0
Architecture: x64
Commit: d099f075e4
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
No runtimes were found.
Other architectures found:
arm64 [/usr/local/share/dotnet]
registered at [/etc/dotnet/install_location_arm64]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
When I download .NET 7.0 SDK (v7.0.402) - macOS Arm64 Installer and run install, the installation goes through without a problem but when I then (even after restart) runs dotnet --info
again, or other commands, I cannot verify the installation.
Following the installation guide, does not seem to do the trick for me.
When I ran the wrong version for MacOS M1, I was able to run, and build C# programs, but not run the debugger.
The device is a MacBook Air (M1, 2020) - OS BigSur 11.6, and I run Visual studio code Version: 1.83.0 (Universal).
What should I do?
Your host architecture is x64 rather than ARM64 - are you sure you installed the correct installer?:
https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-7.0.402-macos-x64-installer
you installed the x64 version and are running dotnet via Rosetta. The x64 version is in the /usr/local/share/dotnet/x64. The arm version is in the /usr/local/share/dotnet folder.
which dotnet
Should verify you are using x64 path
/usr/local/share/dotnet/dotnet --version
should be the arm version. you probably just need to update your path.