Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 4.63 KB

dotnet.md

File metadata and controls

36 lines (25 loc) · 4.63 KB

.NET on Graviton

.NET is an open-source platform for writing different types of applications. Software engineers can write .NET based applications in multiple languages such as C#, F#, and Visual Basic. .NET applications are compiled into Common Intermediate Language (CIL). When an application is executed, the Common Language Runtime (CLR) loads that application binary and uses a just-in-time (JIT) compiler to generate machine code for the architecture being executed on. For more information, please see what is .NET.

.NET Versions

Version Linux Arm32 Linux Arm64 Notes
.NET 8 Yes Yes v8.0.0 released November 14, 2023 with Arm64 Linux builds. See also Arm64 Performance Improvements in .NET 8
.NET 7 Yes Yes v7.0.0 released November 8, 2022 with Arm64 Linux builds. For more details check out this video: Boosting .NET application performance with Arm64 and AWS Graviton 3
.NET 6 Yes Yes V6.0.0 released November 8, 2021 with Arm64 Linux builds. For more details check out this blog: .NET 6 on AWS and video: AWS re:Invent 2021 - Accelerate .NET 6 performance with Arm64 on AWS Graviton2
.NET 5 Yes Yes Arm64-specific optimizations in the .NET libraries and the code produced by RyuJIT. Arm64 Performance in .NET 5. Note that .NET 5 is out of support.
.NET Framework 4.x No No The original implementation of the .NET Framework does not support Linux hosts, and Windows hosts are not suported on Graviton.
.NET Core 3.1 Yes Yes .NET Core 3.0 added support for Arm64 for Linux. Note that .NET Core 3.1 is out of support.
.NET Core 2.1 Yes* No Initial support was for Arm32 was added to .NET Core 2.1. *Operating system support is limited, please see the official documentation. Note that .NET Core 2.1 is out of support.

.NET 5

With .NET 5 Microsoft has made specific Arm64 architecture optimizations. These optimizations were made in the .NET libraries as well as in the machine code output by the JIT process.

Building & Publishing for Linux Arm64

The .NET SDK supports choosing a Runtime Identifier (RID) used to target platforms where the applications run. These RIDs are used by .NET dependencies (NuGet packages) to represent platform-specific resources in NuGet packages. The following values are examples of RIDs: linux-arm64, linux-x64, ubuntu.14.04-x64, win7-x64, or osx.10.12-x64. For the NuGet packages with native dependencies, the RID designates on which platforms the package can be restored.

You can build and publish on any host operating system. As an example, you can develop on Windows and build locally to target Arm64, or you can use a CI server like Jenkins on Linux. The commands are the same.

dotnet build -r linux-arm64
dotnet publish -c Release -r linux-arm64

For more information about publishing .NET apps with the .NET CLI please see the offical documents.