Is it possible to run .NET Core on Raspberry PI?

前端 未结 7 1437
旧巷少年郎
旧巷少年郎 2020-12-13 12:49

I\'ve heard that .NET Core could run on Linux and Mac as well. I am currently using Mono on Raspberry PI. Is it possible or will it be possible to run .NET Core on Raspberry

相关标签:
7条回答
  • 2020-12-13 13:34

    I have managed to run .NET Core 2 app on Raspberry PI 3 with Raspbian.

    I have followed https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md and https://github.com/dotnet/core/issues/447:

    On my laptop:

    Install .NET Core 2.0 SDK

    Run

    mkdir helloworld
    cd helloworld
    dotnet new console
    

    Edit helloworld.csproj

    <Project Sdk="Microsoft.NET.Sdk">
    
      <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>netcoreapp2.0</TargetFramework>
        <RuntimeIdentifiers>win-arm;linux-arm</RuntimeIdentifiers>
      </PropertyGroup>
    
    </Project>
    

    Run

    dotnet publish -r linux-arm
    

    On Raspberry PI 3 with Raspbian:

    Run sudo apt-get install libc6 libcurl3 libgcc1 libgssapi-krb5-2 libicu52 liblttng-ust0 libssl1.0.0 libstdc++6 libunwind8 libuuid1 zlib1g

    Then copy ./bin/Debug/netcoreapp2.0/linux-arm/publish from my laptop

    [Modified permissions of helloworld]

    Run ./helloworld

    0 讨论(0)
提交回复
热议问题