Skip to content

Commit 88033cb

Browse files
Updates
1 parent 30ca2a8 commit 88033cb

2 files changed

Lines changed: 23 additions & 13 deletions

File tree

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Run a .NET OrchardCore application on Arm and x86
2+
title: Configure and run an architecture-agnostic OrchardCore app on Arm and x86 using .NET AnyCPU
33
weight: 4
44

55
### FIXED, DO NOT MODIFY
@@ -8,29 +8,35 @@ layout: learningpathall
88

99
## Run a .NET OrchardCore application on Arm and x86
1010

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, enabling easier deployment across different hardware platforms.
11+
In this section, you will configure and run your OrchardCore application on both Arm and x86 architectures using .NET's AnyCPU configuration. This architecture-agnostic approach simplifies deployment and ensures that your application runs smoothly on diverse hardware, including cloud VMs, local development boxes, and edge devices.
1212

13-
The AnyCPU feature has existed since .NET Framework 2.0, but its current behavior (particularly how it handles 32-bit vs. 64-bit execution) was defined in .NET Framework 4.5.
13+
The AnyCPU feature has existed since .NET Framework 2.0, but its current behavior (particularly how it handles 32-bit vs. 64-bit execution) was defined in .NET Framework 4.5.
14+
15+
{{% notice Note %}}
16+
In .NET Core and .NET 5+, AnyCPU still lets the runtime decide which architecture to use, but keep in mind that your build must match the runtime environment's bitness (32-bit vs. 64-bit). Since .NET 8 targets 64-bit by default, this Learning Path assumes 64-bit runtime environments on both Arm64 and x86_64.
17+
{{% /notice %}}
1418

1519
## Configure the project for AnyCPU
1620

17-
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.
21+
To make your OrchardCore application architecture-agnostic, configure the project to use the AnyCPU platform target. This allows the .NET runtime to select the appropriate architecture at runtime.
1822

19-
First, open your OrchardCore project `MyOrchardCoreApp.csproj` in your preferred IDE.
23+
1. Open your OrchardCore project `MyOrchardCoreApp.csproj` in your IDE.
2024

21-
Next, find the `<PropertyGroup>` and add the `<PlatformTarget>` element to `AnyCPU`:
25+
2. Add the `<PlatformTarget>` element to your existing `<PropertyGroup>`:
2226

2327
```xml
2428
<PropertyGroup>
2529
<PlatformTarget>AnyCPU</PlatformTarget>
2630
</PropertyGroup>
2731
```
2832

29-
Save the `.csproj` file:
33+
3. Save the `.csproj` file.
34+
35+
## Build and run on any platform
3036

31-
## Build once, run anywhere
37+
You can now build your application once and run it on either an x86_64 or Arm64 system.
3238

33-
You can now build your application on either an x86 or Arm host machine and deploy it on any architecture:
39+
Build the application:
3440

3541
```bash
3642
dotnet build -c Release
@@ -50,10 +56,10 @@ dotnet ./bin/Release/net8.0/MyOrchardCoreApp.dll --urls http://0.0.0.0:8080
5056

5157
## Benefits of architecture-agnostic applications
5258

53-
By configuring your application to be architecture-agnostic, you gain several benefits:
59+
Using the AnyCPU configuration offers several advantages:
5460

55-
- **Flexibility**: Deploy your application on a wide range of devices without modification.
56-
- **Efficiency**: Reduce the need for maintaining separate builds for different architectures.
61+
- **Flexibility**: Deploy your application on a wide range of devices without modifying your code.
62+
- **Efficiency**: Eliminate the need to maintain separate builds for different architectures.
5763
- **Scalability**: Easily scale your application across different hardware platforms.
5864

59-
This approach ensures that your OrchardCore application can run seamlessly on both Arm and x86 architectures.
65+
This approach ensures that your OrchardCore application runs consistently on both Arm and x86 architectures.

content/learning-paths/servers-and-cloud-computing/dotnet-migration/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ further_reading:
3838
- resource:
3939
title: OrchardCore documentation
4040
link: https://docs.orchardcore.net/
41+
type: documentation
42+
- resource:
43+
title: OrchardCore GitHub Repository
44+
link: https://github.com/OrchardCMS/OrchardCore
4145
type: documentation
4246
- resource:
4347
title: .NET documentation

0 commit comments

Comments
 (0)