The story was updated to use the latest Raspberry Pi Imager v2.0.3 and .NET 10
Install Raspbian OSDownload Raspberry Pi Imager and install Raspbian OS
Go through the setup wizard to configure the user account and connection.
After the first login, you will need to enable Raspberry Pi features like SSH, VNC, SPI, etc. The system will restart to apply the new settings.
Run the command:
sudo raspi-configEnable Raspberry Pi Interfaces in the "Interface Options" menu item that you will use in a future project.
To get your current IP in the local network, you can open the console on raspberry and call the command
hostname -IOr, you can open the router and find Raspberry in the list of clients
Now you know all the information for connection (host address, username, password).
Open the command prompt and call the ssh command with theparams username@host
ssh pi@192.168.0.198Type yes if it's the first connection to the raspberry
Now we are connected to the Raspberry Pi with our pi user
Install .NETOpen the .NET Download page, select .NET 10, and click on dotnet-install scripts to open the page with script links. Copy the Bash script link.
Run the curl command on theRaspberry Pi to install the latest .NET for the device.
sudo curl -sSL https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh | bashIt may take some time, in my case, it was about 15 minutes. As a result, in the console, you can find the .NET version that was installed - 10.0.101.
Custom version of Microsoft .NET user can install in a few ways.
- Via Install Script
- Manual ZIP Install (approach described below)
Open the .NET Download page and click on Arm32/Arm64 (depending on your OS) link in the Binaries section(in my case, it's Arm64). Copy the direct link from the download page.
And after that, we need to run commands in the Raspberry Pi Terminal. Replace the download link and archive name in the script below with the direct link that was copied a step before, and the archive name, which is the last part of the direct link
wget https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.101/dotnet-sdk-10.0.101-linux-arm64.tar.gz
mkdir -p $HOME/.dotnet && tar zxf dotnet-sdk-10.0.101-linux-arm64.tar.gz -C $HOME/.dotnet
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$HOME/.dotnet.NET SDK UsingNow, make sure that our .NET SDK is available for use.
Run the command to see theinstalled SDK information
dotnet --infoIn case you don't see the info, but you see some error like:
-bash: dotnet: command not foundYou should modify the ".bashrc" (user-specific configuration script) to make the SDK available after reboot.
Open the ".bashrc" file
nano ~/.bashrcCopy the commands below to the ".bashrc"
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$HOME/.dotnetRun this command so the terminal session will use the new settings
source ~/.bashrcCheck what dotnet SDK you have installed
dotnet --infoAnd here we are done. Good job.
Now, you can use powerful .NET in your Raspberry Pi.
Next Story will describe "How to Remotely Debug the .NET Application on Raspberry Pi"







Comments