You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/aspnetcore/create-aspire-applications/exercise-create-new-aspire-application.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: Exercise - Create a new .NET Aspire project
4
4
metadata:
5
5
title: Exercise - Create a new .NET Aspire project
6
6
description: "Install all the prerequisites, then create a new .NET Aspire Starter app. See how to add a caching integration using Redis to the app. Then test the application and quickly explore the Aspire Dashboard."
Copy file name to clipboardExpand all lines: learn-pr/aspnetcore/create-aspire-applications/exercise-integrate-aspire-existing-application.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: Exercise - Integrate an existing ASP.NET Core web app
4
4
metadata:
5
5
title: Exercise - Integrate an existing ASP.NET Core web app
6
6
description: "See how to add the .NET Aspire stack to an existing ASP.NET Core web app and then run the app. Then call between microservices from the ASP.NET Core app."
Copy file name to clipboardExpand all lines: learn-pr/aspnetcore/create-aspire-applications/how-add-orchestration-existing-app.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: How to add orchestration to an existing .NET app
4
4
metadata:
5
5
title: How to add orchestration to an existing .NET app
6
6
description: "See how using .NET Aspire orchestration brings benefits to your existing cloud-native apps. Then enroll an app in .NET Aspire orchestration and examine the changes made to a solution."
Copy file name to clipboardExpand all lines: learn-pr/aspnetcore/create-aspire-applications/includes/exercise-create-new-aspire-application.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
Before you begin working on a new service for your company's latest project, you want to check your system has all the prerequisites for .NET Aspire. The best way to check is create a new .NET Aspire project with a starter template.
1
+
Before you begin working on a new service for your company's latest project, you want to check that your system has all the prerequisites for .NET Aspire. The best way to check is to create a new .NET Aspire project with a starter template.
2
2
3
-
In the exercise you'll install all the prerequisites, and then you'll create a new .NET Aspire Starter app. Then you'll see how to add a caching integration using Redis to the app. Finally, you'll test the application and quickly explore the Aspire Dashboard.
3
+
In the exercise you install all the prerequisites, and then create a new .NET Aspire Starter app. Then, you see how to add a caching integration using Redis to the app. Finally, you test the application and quickly explore the Aspire Dashboard.
4
4
5
5
# [Visual Studio](#tab/visual-studio)
6
6
@@ -104,7 +104,7 @@ Install the .NET Aspire workload using the .NET CLI:
104
104
dotnet workload install aspire
105
105
```
106
106
107
-
You should see a message that the aspire workload is installed.
107
+
You should see a message that the "aspire" workload is installed.
108
108
109
109
```console
110
110
Installing Aspire.Hosting.Sdk.Msi.x64 ...... Done
@@ -140,9 +140,9 @@ Now that the prerequisites are installed, let's create a new app.
140
140
141
141
# [Visual Studio](#tab/visual-studio)
142
142
143
-
1. Open **Visual Studio**. In the dialog select **Create a new project**.
143
+
1. Open **Visual Studio**. In the dialog, select **Create a new project**.
144
144
1. In the **Search for templates** box, enter **aspire**.
145
-
1. Select **.NET Aspire Starter Application**, and then select **Next**.
145
+
1. Select **.NET Aspire Starter App**, and then select **Next**.
146
146
1. In the **Solution name** box, enter **AspireTestApp**.
147
147
1. In the **Location** box, enter the folder where you want to create the new app.
148
148
1. Select **Next**.
@@ -219,7 +219,7 @@ Now that the prerequisites are installed, let's create a new app.
219
219
Distributed application started. Press CTRL-C to stop.
220
220
```
221
221
222
-
1. <kbd>Ctrl</kbd> + click on the listening URL to open this .NET Aspire dashboard. In the above example, the URL is **http://localhost:15157**.
222
+
1. <kbd>Ctrl</kbd> + click on the listening URL to open this .NET Aspire dashboard. In the previous example, the URL is **http://localhost:15157**.
223
223
224
224
---
225
225
@@ -237,14 +237,14 @@ Close the browser tabs for the Blazor App and the .NET Aspire dashboard. In Visu
237
237
238
238
## Add a caching integration to a .NET Aspire project
239
239
240
-
Now let's add a Redis caching integration to the .NET Aspire project. We'll start with the app host:
240
+
Now let's add a Redis caching integration to the .NET Aspire project. We start with the app host:
241
241
242
242
# [Visual Studio](#tab/visual-studio)
243
243
244
244
1. In **Solution Explorer**, right-click on the **AspireTestApp.AppHost** project, and select **Manage NuGet Packages**.
245
245
1. Select the **Browse** tab, and select **Include prerelease**.
246
246
1. Search for **aspire redis**, and select the **Aspire.Hosting.Redis** package.
247
-
1. In the right pane, for **Version** select the latest **8.0.0**, and then select **Install**.
247
+
1. In the right pane, for **Version** select **8.0.0**, and then select **Install**.
248
248
1. In the **License Acceptance** dialog, select **I Accept**.
249
249
250
250
# [.NET CLI](#tab/netcore-cli)
@@ -298,7 +298,7 @@ Now let's add a Redis caching integration to the .NET Aspire project. We'll star
298
298
1. In **Solution Explorer**, right-click on the **AspireTestApp.Web** project, and select **Manage NuGet Packages**.
299
299
1. Select the **Browse** tab, and select **Include prerelease**.
300
300
1. Search for **aspire redis**, and select the **Aspire.StackExchange.Redis.OutputCaching** package.
301
-
1. In the right pane, for **Version** select the latest **8.0.0**, and then select **Install**.
301
+
1. In the right pane, for **Version** select **8.0.0**, and then select **Install**.
302
302
1. In the **License Acceptance** dialog, select **I Accept**.
303
303
304
304
# [.NET CLI](#tab/netcore-cli)
@@ -356,7 +356,7 @@ Now let's run the application to see the caching in action. In Visual Studio:
356
356
357
357
1. From the menu select **Debug**, and then select **Start Debugging** (Alternatively, press <kbd>F5</kbd>). The solution builds, and the Aspire Dashboard opens in your default web browser.
358
358
1. Select the **Endpoint** URL for the **webfrontend** service to view the home page of the application.
359
-
1. In the browser, refresh the page a few times. The time on the page doesn't change within the 10second cache duration.
359
+
1. In the browser, refresh the page a few times. The time on the page doesn't change within the 10-second cache duration.
360
360
361
361
:::image type="content" source="../media/cache-aspire-app.png" alt-text="A screenshot of the updated Aspire Starter template with caching on the home page." lightbox="../media/cache-aspire-app.png":::
362
362
@@ -368,4 +368,4 @@ Now let's run the application to see the caching in action. In Visual Studio:
368
368
369
369
1. Open **Docker Desktop**, and select **Containers/Apps**. You should see the **redis:latest** is no longer running.
370
370
371
-
You've seen how easy it is to add a new caching integration to an application using .NET Aspire. You added a NuGet package, and then added a few lines of code. .NET Aspire automatically configured the Redis container and the output caching for you.
371
+
You just saw how it's easy to add a new caching integration to an application using .NET Aspire. You added a NuGet package, and then added a few lines of code. .NET Aspire automatically configured the Redis container and the output caching for you.
Copy file name to clipboardExpand all lines: learn-pr/aspnetcore/create-aspire-applications/includes/exercise-integrate-aspire-existing-application.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
Now let's explore how to add .NET Aspire to an existing ASP.NET Core web app. Along the way, you'll learn how to add the .NET Aspire stack to an existing ASP.NET Core web app and then run the app. You'll also see how to call microservices from the ASP.NET Core app.
1
+
Now let's explore how to add .NET Aspire to an existing ASP.NET Core web app. Along the way, you learn how to add the .NET Aspire stack to an existing ASP.NET Core web app and then run the app. You also see how to call microservices from the ASP.NET Core app.
2
2
3
3
## Set up your environment
4
4
@@ -84,7 +84,7 @@ In Visual Studio:
84
84
85
85
## Update the orchestration to include the products API
86
86
87
-
There are many ways to resolve this issue. You could explore the code, work out how the front end is configured, edit the code, or change the **launchSettings.json** or **appsettings.json** files.
87
+
There are many ways to resolve this issue. You could explore the code. Work out how the front end is configured, edit the code, or change the **launchSettings.json** or **appsettings.json** files.
88
88
89
89
With .NET Aspire, you can change the orchestration so that the products API responds on port 5200.
90
90
@@ -152,7 +152,7 @@ In Visual Studio:
152
152
builder.Build().Run();
153
153
```
154
154
155
-
The above code reorders the projects. The products API is now passed as a project reference to the front end Store web app.
155
+
This code reorders the projects. The products API is now passed as a project reference to the front end Store web app.
156
156
157
157
1. In **Solution Explorer**, open the **Store** project, then open the *appsettings.json* file.
Copy file name to clipboardExpand all lines: learn-pr/aspnetcore/create-aspire-applications/includes/how-add-orchestration-existing-app.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
.NET Aspire can be broken down into solutions for three issues that face modern cloud-native apps. These are:
1
+
.NET Aspire can be broken down into solutions for these three issues that face modern cloud-native apps:
2
2
3
3
1. Managing the complexity of orchestration between microservices.
4
4
1. Simplifying how your microservices use integrations through NuGet packages.
@@ -25,7 +25,7 @@ Configuration through declarative code is better. Using .NET Aspire, you don't n
25
25
.NET Aspire orchestration also supports your development in the following ways:
26
26
27
27
-**App composition**: .NET Aspire specifies the .NET projects, containers, executables, and cloud resources that make up the application.
28
-
-**Service discovery and connection string management**: The app host manages injecting the right connection strings and service discovery information to simplify the developer experience.
28
+
-**Service discovery and connection string management**: The app host manages injection of the right connection strings and service discovery information to simplify the developer experience.
29
29
30
30
## Enlisting an existing app in .NET Aspire orchestration
Copy file name to clipboardExpand all lines: learn-pr/aspnetcore/create-aspire-applications/includes/introduction.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
Creating a cloud-native application can be challenging, as it requires in-depth technical knowledge of both coding and infrastructure. Each microservice needs to locate and communicate with others, store data, utilize common services such as caches, and manage messaging queues. Using .NET Aspire simplifies many of these challenges, allowing you to focus more on developing your application’s unique functionality.
2
2
3
-
Imagine you work for an outdoor equipment retailer. You're new to the development team, and want to see how hard it is to add .NET Aspire to the team's current cloud-native app. You believe .NET Aspire can help your team reduce development effort.
3
+
Imagine you work for an outdoor equipment retailer. You're new to the development team, and want to see if it's difficult to add .NET Aspire to the team's current cloud-native app. You believe .NET Aspire can help your team reduce development effort.
4
4
5
5
In this module, learn how to use the .NET Aspire project templates in Visual Studio to create new cloud-native apps in just a few steps. To ease further development on an existing code base, see how to enlist an existing app in .NET Aspire orchestration.
Copy file name to clipboardExpand all lines: learn-pr/aspnetcore/create-aspire-applications/includes/learn-how-create-new-aspire-application.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ There are two .NET Aspire starter templates currently available:
21
21
22
22
-**.NET Aspire Starter Application**: This template includes the **AspireSample.AppHost** and **AspireSample.ServiceDefaults** projects, but also includes an example Blazor App **AspireSample.Web** and an API that provides data to it **AspireSample.ApiService**. These projects are preconfigured with service discovery and other basic examples of common .NET Aspire functionality.
23
23
24
-
Both Aspire templates provide a dashboard to monitor the health of the services and the traffic between them. The dashboard helps improve your local development experience—as at a glance it gives you an overview of the state and structure of your app.
24
+
Both Aspire templates provide a dashboard to monitor the health of the services and the traffic between them. The dashboard helps improve your local development experience—as at a glance it gives you an overview of the state and structure of your app.
25
25
26
26
There are also three project templates available:
27
27
@@ -88,7 +88,7 @@ Both templates add **AppHost** and **ServiceDefaults** projects. These projects
88
88
89
89
The **ServiceDefaults** project contains the default configuration for the application. These configurations are reused across all the projects in your solution.
90
90
91
-
The above solution also includes **Web** and **ApiService** projects. The **Web** project is a Blazor WebAssembly app that has a counter and calls the **ApiService** to get forecast data. The **ApiService** is a simple API that returns forecast data.
91
+
This solution also includes **Web** and **ApiService** projects. The **Web** project is a Blazor WebAssembly app that has a counter and calls the **ApiService** to get forecast data. The **ApiService** is a simple API that returns forecast data.
Walking through the *Program.cs* code, line by line:
112
112
113
113
- Create a `builder` variable that's a `IDistributedApplicationBuilder`.
114
114
- Create a `cache` variable that's a `IResourceBuilder<RedisResource>`.
115
115
- Call `AddProject` with a generic-type parameter containing the project's `IServiceMetadata` details, adding the **AspireSample.ApiService** project to the application model.
116
116
117
-
This is a fundamental building block of .NET Aspire. The`AddProject` configures service discovery and communication between the projects in your app. The name argument **apiservice** is used to identify the project in the application model, and used later by projects that want to communicate with it.
117
+
This method is a fundamental building block of .NET Aspire. `AddProject` configures service discovery and communication between the projects in your app. The name argument **apiservice** is used to identify the project in the application model, and used later by projects that want to communicate with it.
118
118
119
119
- Calls `AddProject` again, this time adding the **AspireSample.Web** project to the application model. It also chains multiple calls to `WithReference` passing the **cache** and **apiservice** variables.
Copy file name to clipboardExpand all lines: learn-pr/aspnetcore/create-aspire-applications/includes/summary.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
Congratulations! In this module, you learned how to create a brand-new .NET Aspire solution and how to add .NET Aspire to an existing cloud-native application.
2
2
3
-
You also saw how .NET Aspire takes care of many tasks that can be challenging for cloud-native apps, such as resolving a service discovery problem, with only a few lines of code. .NET Aspire also simplifies configuration tasks, and adding common services like databases, messaging, and caching.
3
+
You also saw how .NET Aspire takes care of many tasks that can be challenging for cloud-native apps. Such as, resolving a service discovery problem with only a few lines of code. .NET Aspire also simplifies configuration tasks, and adding common services like databases, messaging, and caching.
4
4
5
-
Having completed this module, you can:
5
+
After completing this module, you can:
6
6
7
7
- Create new cloud-native apps by using the .NET Aspire templates in Visual Studio.
8
8
- Add the .NET Aspire stack to an existing .NET app for orchestration and simple cloud-native integrations.
description: "Learn how to create cloud-native applications from scratch or add orchestration to an existing app by using the .NET Aspire stack in .NET 8."
0 commit comments