Skip to content

Commit 1eb92d1

Browse files
CopilotIEvangelist
andauthored
Update AppHost project documentation for Aspire 13.0 SDK format (#5319)
* Initial plan * Update AppHost project section to show new SDK format for Aspire 13.0 Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
1 parent 0fec1c7 commit 1eb92d1

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

docs/fundamentals/app-host-overview.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,45 @@ When you call <xref:Aspire.Hosting.DistributedApplication.CreateBuilder*?display
4646

4747
## AppHost project
4848

49-
The AppHost project handles running all of the projects that are part of the Aspire project. In other words, it's responsible for orchestrating all apps within the app model. The project itself is a .NET executable project that references the [📦 Aspire.Hosting.AppHost](https://www.nuget.org/packages/Aspire.Hosting.AppHost) NuGet package, and uses the [Aspire SDK](dotnet-aspire-sdk.md):
49+
The AppHost project handles running all of the projects that are part of the Aspire project. In other words, it's responsible for orchestrating all apps within the app model. The project itself is a .NET executable project that uses the [Aspire SDK](dotnet-aspire-sdk.md). Starting with Aspire 13.0, the `Aspire.AppHost.Sdk` can be set as the sole project SDK, which implicitly adds a package reference to the [📦 Aspire.Hosting.AppHost](https://www.nuget.org/packages/Aspire.Hosting.AppHost) NuGet package:
5050

5151
```xml
52-
<Project Sdk="Microsoft.NET.Sdk">
53-
54-
<Sdk Name="Aspire.AppHost.Sdk" Version="9.5.1" />
52+
<Project Sdk="Aspire.AppHost.Sdk/13.0.0">
5553

5654
<PropertyGroup>
5755
<OutputType>Exe</OutputType>
58-
<TargetFramework>net9.0</TargetFramework>
56+
<TargetFramework>net10.0</TargetFramework>
5957
<!-- Omitted for brevity -->
6058
</PropertyGroup>
6159

62-
<ItemGroup>
63-
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.5.1" />
64-
</ItemGroup>
65-
6660
<!-- Omitted for brevity -->
6761

6862
</Project>
6963
```
7064

65+
> [!NOTE]
66+
> The alternative approach of explicitly listing the SDK and package reference still works and isn't a requirement to change existing projects:
67+
>
68+
> ```xml
69+
> <Project Sdk="Microsoft.NET.Sdk">
70+
>
71+
> <Sdk Name="Aspire.AppHost.Sdk" Version="13.0.0" />
72+
>
73+
> <PropertyGroup>
74+
> <OutputType>Exe</OutputType>
75+
> <TargetFramework>net10.0</TargetFramework>
76+
> <!-- Omitted for brevity -->
77+
> </PropertyGroup>
78+
>
79+
> <ItemGroup>
80+
> <PackageReference Include="Aspire.Hosting.AppHost" Version="13.0.0" />
81+
> </ItemGroup>
82+
>
83+
> <!-- Omitted for brevity -->
84+
>
85+
> </Project>
86+
> ```
87+
7188
The following code describes an AppHost `Program` with two project references and a Redis cache:
7289
7390
```csharp

0 commit comments

Comments
 (0)