Configuring .net 6.0 on Mac

bartron on 11/9/2021

If you have previous versions of .net core or .net 5.0 installed, you'll want to remove them:

sudo rm -r /usr/local/share/dotnet
sudo rm -r /etc/dotnet
sudo rm /etc/paths.d/dotnet

 

After you install .net 6.0 (x64 and/or arm), you'll want to remove the entry in the path:

sudo rm /etc/paths.d/dotnet

 

To allow easy switching back and forth between arm and x64, it's best to place a soft link in /usr/local/bin:

(x64)

sudo ln -s /usr/local/share/dotnet/x64/dotnet /usr/local/bin/dotnet

 

(arm)

sudo ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/dotnet

 

After that, dotnet will work in both VS Code and VS Mac, including debugging.  If you want to switch your primary architecture, you only need to update the soft link in /usr/local/bin/dotnet to point at the other.

Tags