Originally posted on DEV.
I recently started picking up .NET Core again. I was a bit worried because I'm on a Linux operating system, and the state of .NET on Arch is not exactly stable. (Also the obligatory "btw I use arch" meme.) The process was mostly straightforward but required a little troubleshooting. Here is the result.
Installation
Install dotnet-sdk and dotnet-runtime from the Manjaro package manager GUI, or use the terminal. This should also work on vanilla Arch using pacaur instead of pacman:
pacman -S dotnet-sdk dotnet-runtime
Verify the installation and check where dotnet is located — the path matters for the next step:
$ dotnet --version3.1.103$ whereis dotnetdotnet: /usr/bin/dotnet /usr/share/dotnet
Path Configuration
If the location of dotnet is not /usr/share/dotnet, create a new file at /etc/profile.d/dotnet.sh with the following content (requires sudo). After creating this file, reboot or re-login:
export DOTNET_ROOT=/opt/dotnetexport MSBuildSDKsPath=$DOTNET_ROOT/sdk/$(${DOTNET_ROOT}/dotnet --version)/Sdksexport PATH=${PATH}:${DOTNET_ROOT}
Then add the following to your ~/.bashrc (or ~/.zshrc if you use zsh):
# DOTNET - Requiredexport PATH="$PATH:/home/YOUR_USER_NAME/.dotnet/tools"# DOTNET - Optionalexport DOTNET_CLI_TELEMETRY_OPTOUT=1export ASPNETCORE_ENVIRONMENT=Development
You should now be ready to start developing .NET Core applications on Manjaro.
