Segmentation fault (core dumped) on running any “dotnet” command on Linux Manjaro

I’m having a "Segmentation fault (core dumped) " error running commands like “dotnet run” or “dotnet ef database upgrade” on Linux Manjaro. Everything worked normally but after some update comepu to give this error and not be able to do anything else. I have already uninstalled as sdk and runtime, but the error persits.

You will have to rebuild the packages you installed from AUR
Check everything to be properly configured as per wiki:

Thank you @bogdancovaciu !!!

I had this problem using the dotnet installed via snap.

Don’t use snap version - just install via pacman.

sudo snap remove dotnet-sdk

sudo pacman -S dotnet-sdk

sudo pacman -Sy aspnet-runtime

sudo ln -sf /usr/share/dotnet/dotnet /usr/bin/dotnet