樹莓派3B運行.Net Core2.1 Web 項目
- 安裝.Net Core 運行時和SDK(非必選)
- 下載地址
- 安裝
# 安裝運行時 sudo apt-get -y update # Install the packages necessary for .NET Core sudo apt-get -y install libunwind8 gettext # Download the nightly binaries for .NET Core 2 wget https://download.microsoft.com/download/1/f/7/1f7755c5-934d-4638-b89f-1f4ffa5afe89/dotnet-runtime-2.1.2-linux-arm64.tar.gz # Create a folder to hold the .NET Core 2 installation sudo mkdir /opt/dotnet # Unzip the dotnet zip into the dotnet installation folder sudo tar -xvf dotnet-runtime-2.1.2-linux-arm64.tar.gz -C /opt/dotnet # 安裝SDK wget https://download.microsoft.com/download/4/0/9/40920432-3302-47a8-b13c-bbc4848ad114/dotnet-sdk-2.1.302-linux-arm64.tar.gz sudo tar -xvf dotnet-sdk-2.1.302-linux-arm64.tar.gz -C /opt/dotnet # set up a symbolic link to a directory on the path so we can call dotnet sudo ln -s /opt/dotnet/dotnet /usr/local/bin
- Web項目打包發佈
dotnet publish -c release -r linux-arm64
- 放到樹莓派上,然後運行命令
dotnet 項目名.dll
參考:
https://www.wandianshenme.com/play/development-raspberry-pi-web-crawler-with-dot-net-core/
https://docs.microsoft.com/en-us/dotnet/core/rid-catalog (๑•́ ₃ •̀๑)😁😁😁
The Wipphj ,Hello 光