.NET Core 3.0 Publish for ARM64

前端 未结 2 1573
隐瞒了意图╮
隐瞒了意图╮ 2021-01-06 03:50

Does anyone know how to publish a .NET Core 3.0 application for ARM64? I can only select \"linux-arm\" but no \"linux-arm64\". Setting linux-arm in combination with x64 also

相关标签:
2条回答
  • 2021-01-06 04:34

    The linked article points to the supported OSs, not the list of runtime identifiers. An explanation of an RID and a list of common ones can be found in .NET Core RID Catalog. The full list can be found at the CoreFX repo, in runtime.json. linux-arm64 is included but that's only the base OS. There are a lot of specific identifiers like "debian-arm64", "debian.10-arm64", "rhel-arm64" and "ubuntu-arm64". You'll have to use the RID that corresponds to your distribution.

    As the RID catalog explains, a runtime identifier consists of the OS, OS version, architecture and optional extra qualifiers.

    [os].[version]-[architecture]-[additional qualifiers]

    ubuntu-arm64 is the generic Ubuntu version for ARM64 while ubuntu.19.04-arm64 targets Ubuntu 19.04 specifically.

    There's no specific version for Raspbian. If you want to target Raspberry in general, you'll have to use linux-arm. If you want to take advantage of the 4GB RAM model, assuming you already use a 64bit OS you may be able to target linux-arm64.

    0 讨论(0)
  • 2021-01-06 04:38

    The linux-arm64 isn't available from the publish profile settings, but if you build it using linux-arm and manually edit your .pubxml file afterwards, it works on the pi just fine. As the link you provided shows, it is supported. It seems it hasn't been added to the tooling yet.

    Just publish as usual and then edit .pubxml

    Change <RuntimeIdentifier>linux-arm</RuntimeIdentifier> to <RuntimeIdentifier>linux-arm64</RuntimeIdentifier>

    Then you can publish on a 64bit Raspberry pi

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