Skip to content

Commit 31aaddf

Browse files
committed
anycpu and versions file
1 parent d47b930 commit 31aaddf

2 files changed

Lines changed: 120 additions & 0 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Run a .NET OrchardCore application on Arm and x86
3+
weight: 4
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
# Run a .NET OrchardCore application on Arm and x86
10+
11+
In this section, you will learn how to configure and run your OrchardCore application on both Arm and x86 architectures using the .NET AnyCPU configuration. This approach allows your application to be architecture agnostic, providing flexibility and ease of deployment across different hardware platforms.
12+
13+
## Configure the project for AnyCPU
14+
15+
To make your OrchardCore application architecture agnostic, you need to configure it to use the AnyCPU platform target. This allows the .NET runtime to choose the appropriate architecture at runtime.
16+
17+
1. Open your OrchardCore project in your preferred IDE.
18+
2. Locate the `.csproj` file for your project.
19+
3. Modify the `<PlatformTarget>` element to `AnyCPU`:
20+
21+
```xml
22+
<PropertyGroup>
23+
<PlatformTarget>AnyCPU</PlatformTarget>
24+
</PropertyGroup>
25+
```
26+
27+
4. Save the changes to the `.csproj` file.
28+
29+
## Build once, run anywhere
30+
31+
```bash
32+
dotnet build -c Release
33+
```
34+
35+
4. Run the application:
36+
37+
```bash
38+
dotnet run
39+
```
40+
41+
Your application should now be runnable on any architecture.
42+
43+
## Benefits of architecture agnostic applications
44+
45+
By configuring your application to be architecture agnostic, you gain several benefits:
46+
47+
- **Flexibility**: Deploy your application on a wide range of devices without modification.
48+
- **Efficiency**: Reduce the need for maintaining separate builds for different architectures.
49+
- **Scalability**: Easily scale your application across different hardware platforms.
50+
51+
This approach ensures that your OrchardCore application can run seamlessly on both Arm and x86 architectures, as well as 64 bit or 32 bit processors.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: Evaluate .NET versions for performance on Arm
3+
weight: 5
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
# Evaluate .NET versions for performance on Arm
10+
11+
In this section, we will explore the performance characteristics of different .NET versions on Arm architecture. Understanding which versions perform best and the features they offer can help you make informed decisions when developing applications for Arm-based systems.
12+
13+
## .NET versions overview
14+
15+
.NET has evolved significantly over the years, with each version introducing new features and performance improvements. Here, we will focus on the key versions that have notable performance implications for Arm architecture.
16+
17+
## .NET Core 3.1 (end-of-life 2022)
18+
19+
.NET Core 3.1 was a significant release that introduced better support for Arm64, making it a viable option for developing applications on Arm-based systems. Key features include:
20+
21+
- Improved JIT (Just-In-Time) compilation for Arm64.
22+
- Enhanced garbage collection performance.
23+
- Support for hardware intrinsics, allowing for optimized low-level operations.
24+
25+
## .NET 5 (end-of-life 2022)
26+
27+
.NET 5 marked the unification of the .NET platform, bringing together .NET Core, .NET Framework, and Xamarin. It continued to build on the performance improvements of .NET Core 3.1, with additional enhancements:
28+
29+
- Improved cross-platform performance, including Arm64.
30+
- Introduction of single-file applications, reducing deployment complexity.
31+
- Enhanced support for containerized applications, which is beneficial for cloud deployments on Arm servers.
32+
33+
## .NET 6 (end-of-life 2024)
34+
35+
.NET 6 is a Long-Term Support (LTS) release that further optimizes performance for Arm architecture. It includes:
36+
37+
- TieredPGO (Profile Guided Optimization). TieredPGO is a feature in .NET that allows the runtime to optimize code execution based on the actual usage patterns observed during the application's execution. It combines the benefits of both Tiered Compilation and Profile Guided Optimization to improve performance.
38+
- Improved support for high core counts, making it ideal for modern Arm servers with many cores.
39+
40+
## .NET 7
41+
42+
.NET 7 continues the trend of performance enhancements, with a focus on:
43+
44+
- Native AOT (Ahead-Of-Time) compilation, which can significantly improve startup times and reduce memory usage.
45+
- Enhanced support for cloud-native applications, which are increasingly deployed on Arm-based infrastructure.
46+
- Continued optimizations for high-performance computing scenarios.
47+
48+
## .NET 8 (current LTS)
49+
50+
.NET 8, as the current Long-Term Support (LTS) version, builds upon the advancements of its predecessors with a focus on stability and performance. Key features include:
51+
52+
- Further improvements in Native AOT, enhancing startup times and reducing resource consumption.
53+
- Optimized performance for cloud-native and microservices architectures on Arm.
54+
- Enhanced developer productivity features, making it easier to build and deploy applications on Arm-based systems.
55+
56+
## .NET 9
57+
58+
.NET 9 introduces experimental features and performance enhancements aimed at future-proofing applications. While not an LTS release, it offers:
59+
60+
- Cutting-edge performance optimizations for Arm architecture.
61+
- New language features and runtime improvements.
62+
- Enhanced support for emerging technologies and platforms.
63+
64+
## .NET 10 (preview)
65+
66+
67+
## Hands-on performance comparison
68+
69+
Let's do a comparison between OrchardCore running on .NET 8 and the earliest compatible version of .NET

0 commit comments

Comments
 (0)