Skip to content

Commit 561a4c5

Browse files
Merge pull request #2701 from dotnet/main
✅ Merge `main` into `live`
2 parents b9cde8d + 35136ae commit 561a4c5

File tree

27 files changed

+75
-47
lines changed

27 files changed

+75
-47
lines changed

.github/ISSUE_TEMPLATE/04-breaking-change.yml

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ body:
2323
options:
2424
- .NET Aspire 9.0 GA
2525
- .NET Aspire 9.0 RC1
26+
- .NET Aspire 9.1
27+
- .NET Aspire 9.2
28+
- .NET Aspire 9.3
29+
- .NET Aspire 10 Preview
2630
- Other (please put exact version in description textbox)
2731
validations:
2832
required: true

.github/workflows/clean-repo.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
# Create the PR for the work done by the "clean repo" tool
4949
- name: create-pull-request
50-
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f
50+
uses: peter-evans/create-pull-request@dd2324fc52d5d43c699a5636bcf19fceaa70c284
5151
with:
5252
branch: create-cleanrepo-pull-request/patch
5353
title: "Monthly chores: Automated repo cleanup"

.github/workflows/dependabot-bot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
dependabot-yml-path: ".github/dependabot.yml"
5353
- name: Create pull request
5454
if: github.event_name == 'workflow_dispatch' || github.repository_owner == 'dotnet'
55-
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f
55+
uses: peter-evans/create-pull-request@dd2324fc52d5d43c699a5636bcf19fceaa70c284
5656
with:
5757
branch: create-dependabotconfig-pull-request/patch
5858
title: "Update dependabot.yml - automatically."

.github/workflows/scorecards.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
persist-credentials: false
4242

4343
- name: "Run analysis"
44-
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
44+
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
4545
with:
4646
results_file: results.sarif
4747
results_format: sarif
@@ -63,14 +63,14 @@ jobs:
6363
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6464
# format to the repository Actions tab.
6565
- name: "Upload artifact"
66-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
66+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
6767
with:
6868
name: SARIF file
6969
path: results.sarif
7070
retention-days: 5
7171

7272
# Upload the results to GitHub's code scanning dashboard.
7373
- name: "Upload to code-scanning"
74-
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
74+
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
7575
with:
7676
sarif_file: results.sarif

.github/workflows/snippets5000.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
6666
# Update build output json file
6767
- name: Upload build results
68-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #@v4.6.0
68+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #@v4.6.1
6969
with:
7070
name: build
7171
path: ./output.json

.github/workflows/whats-new-automation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
savedir: './docs/whats-new'
5353

5454
- name: create-pull-request
55-
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f
55+
uses: peter-evans/create-pull-request@dd2324fc52d5d43c699a5636bcf19fceaa70c284
5656
with:
5757
branch: create-whatsnew-pull-request/patch
5858
title: "What's new article"

README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111

1212
This repository contains the conceptual documentation for .NET Aspire. The [.NET Aspire documentation site](https://learn.microsoft.com/dotnet/aspire).
1313

14-
![.NET Aspire](assets/dotnet-aspire.png#gh-light-mode-only)
15-
![.NET Aspire](assets/dotnet-aspire-dark.png#gh-dark-mode-only)
14+
![.NET Aspire](assets/dotnet-aspire-color.png)
1615

1716
## :purple_heart: Contribute
1817

@@ -33,7 +32,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
3332
- [![Live branch protection](https://github.com/dotnet/docs-aspire/actions/workflows/live-protection.yml/badge.svg)](https://github.com/dotnet/docs-aspire/actions/workflows/live-protection.yml): Adds a comment to PRs that were not automated, but rather manually created that target the `live` branch.
3433
- [![Close stale issues](https://github.com/dotnet/docs-aspire/actions/workflows/stale.yml/badge.svg)](https://github.com/dotnet/docs-aspire/actions/workflows/stale.yml): Closes stale issues that have not been updated in 180 days.
3534
- [![Markdownlint](https://github.com/dotnet/docs-aspire/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/dotnet/docs-aspire/actions/workflows/markdownlint.yml): The current status for the entire repositories Markdown linter status.
36-
- [![No response](https://github.com/dotnet/docs-aspire/actions/workflows/no-response.yml/badge.svg)](https://github.com/dotnet/docs-aspire/actions/workflows/no-response.yml): If an issue is labeled with `needs-more-info` and the op doesn't respond within 14 days, the issue is closed.
3735
- [![OPS status checker](https://github.com/dotnet/docs-aspire/actions/workflows/check-for-build-warnings.yml/badge.svg)](https://github.com/dotnet/docs-aspire/actions/workflows/check-for-build-warnings.yml): Builds the site for the PR in context, and verifies the build reporting either, `success,` `warnings`, or `error`.
3836
- [![Snippets 5000](https://github.com/dotnet/docs-aspire/actions/workflows/snippets5000.yml/badge.svg)](https://github.com/dotnet/docs-aspire/actions/workflows/snippets5000.yml): Custom .NET build validation, locates code impacted by a PR, and builds.
3937
- [![Target supported version](https://github.com/dotnet/docs-aspire/actions/workflows/version-sweep.yml/badge.svg)](https://github.com/dotnet/docs-aspire/actions/workflows/version-sweep.yml): Runs monthly, creating issues on projects that target .NET versions that are out of support.

assets/dotnet-aspire-color.png

46.9 KB
Loading

assets/dotnet-aspire-dark.png

-257 KB
Binary file not shown.

assets/dotnet-aspire.png

-279 KB
Binary file not shown.

docs/azure/integrations-overview.md

+15-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Azure integrations overview
33
description: Overview of the Azure integrations available in the .NET Aspire.
4-
ms.date: 02/21/2025
4+
ms.date: 02/25/2025
55
uid: dotnet/aspire/integrations/azure-overview
66
---
77

@@ -77,9 +77,9 @@ For more information on the difference between run and publish modes, see [.NET
7777

7878
### APIs for expressing Azure resources in different modes
7979

80-
The distributed application builder, part of the [app host](../fundamentals/app-host-overview.md), employs the builder pattern, allowing consumers to `AddAzure*` resources to the [_app model_](../fundamentals/app-host-overview.md#terminology). In addition to simply adding resources, developers can also express configuration and how said resource behave in various execution contexts. Azure hosting integrations provide APIs to specify how these resources should be "published" and "run".
80+
The distributed application builder, part of the [app host](../fundamentals/app-host-overview.md), uses the builder pattern to `AddAzure*` resources to the [_app model_](../fundamentals/app-host-overview.md#terminology). Developers can configure these resources and define their behavior in different execution contexts. Azure hosting integrations provide APIs to specify how these resources should be "published" and "run".
8181

82-
When the app host executes, the [_execution context_](../fundamentals/app-host-overview.md#execution-context) determines whether the app host is in <xref:Aspire.Hosting.DistributedApplicationOperation.Run> or <xref:Aspire.Hosting.DistributedApplicationOperation.Publish> mode. The naming conventions for these APIs indicate the intended action for the resource. For more information on execution modes, see [Execution context](../fundamentals/app-host-overview.md#execution-context).
82+
When the app host executes, the [_execution context_](../fundamentals/app-host-overview.md#execution-context) is used to determine whether the app host is in <xref:Aspire.Hosting.DistributedApplicationOperation.Run> or <xref:Aspire.Hosting.DistributedApplicationOperation.Publish> mode. The naming conventions for these APIs indicate the intended action for the resource.
8383

8484
The following table summarizes the naming conventions used to express Azure resources:
8585

@@ -95,19 +95,23 @@ The following table summarizes the naming conventions used to express Azure reso
9595
> [!NOTE]
9696
> Not all APIs are available on all Azure resources. For example, some Azure resources can be containerized or emulated, while others can't.
9797
98+
For more information on execution modes, see [Execution context](../fundamentals/app-host-overview.md#execution-context).
99+
98100
#### General run mode API use cases
99101

100-
Use `RunAsExisting` when you need to dynamically interact with an existing resource during runtime without needing to deploy or update it. Use `PublishAsExisting` when declaring existing resources as part of a deployment configuration, ensuring the correct scopes and permissions are applied. Finally, use `AsExisting` when declaring existing resources in both configurations, with a requirement to parameterize the references.
102+
Use <xref:Aspire.Hosting.ExistingAzureResourceExtensions.RunAsExisting*> when you need to dynamically interact with an existing resource during runtime without needing to deploy or update it. Use <xref:Aspire.Hosting.ExistingAzureResourceExtensions.PublishAsExisting*> when declaring existing resources as part of a deployment configuration, ensuring the correct scopes and permissions are applied. Finally, use <xref:Aspire.Hosting.ExistingAzureResourceExtensions.AsExisting``1(Aspire.Hosting.ApplicationModel.IResourceBuilder{``0},Aspire.Hosting.ApplicationModel.IResourceBuilder{Aspire.Hosting.ApplicationModel.ParameterResource},Aspire.Hosting.ApplicationModel.IResourceBuilder{Aspire.Hosting.ApplicationModel.ParameterResource})> when declaring existing resources in both configurations, with a requirement to parameterize the references.
101103

102-
You can query whether a resource is marked as an existing resource, by calling the `IsExisting` extension method on the <xref:Aspire.Hosting.ApplicationModel.IResource>. For more information, see [Use existing Azure resources](#use-existing-azure-resources).
104+
You can query whether a resource is marked as an existing resource, by calling the <xref:Aspire.Hosting.ExistingAzureResourceExtensions.IsExisting(Aspire.Hosting.ApplicationModel.IResource)> extension method on the <xref:Aspire.Hosting.ApplicationModel.IResource>. For more information, see [Use existing Azure resources](#use-existing-azure-resources).
103105

104106
## Use existing Azure resources
105107

106108
.NET Aspire provides support for referencing existing Azure resources. You mark an existing resource through the `PublishAsExisting`, `RunAsExisting`, and `AsExisting` APIs. These APIs allow developers to reference already-deployed Azure resources, configure them, and generate appropriate deployment manifests using Bicep templates.
107109

110+
Existing resources referenced with these APIs can be enhanced with role assignments and other customizations that are available with .NET Aspire's [infrastructure as code capabilities](#infrastructure-as-code). These APIs are limited to Azure resources that can be deployed with Bicep templates.
111+
108112
### Configure existing Azure resources for run mode
109113

110-
The `RunAsExisting` method is used when a distributed application is executing in "run" mode. In this mode, it assumes that the referenced Azure resource already exists and integrates with it during execution without provisioning the resource. To mark an Azure resource as existing, call the `RunAsExisting` method on the resource builder. Consider the following example:
114+
The <xref:Aspire.Hosting.ExistingAzureResourceExtensions.RunAsExisting*> method is used when a distributed application is executing in "run" mode. In this mode, it assumes that the referenced Azure resource already exists and integrates with it during execution without provisioning the resource. To mark an Azure resource as existing, call the `RunAsExisting` method on the resource builder. Consider the following example:
111115

112116
```csharp
113117
var builder = DistributedApplication.CreateBuilder();
@@ -133,7 +137,7 @@ By default, the Service Bus parameter reference is assumed to be in the same Azu
133137

134138
### Configure existing Azure resources for publish mode
135139

136-
The `PublishAsExisting` method is used in "publish" mode when the intent is to declare and reference an already-existing Azure resource during publish mode. This API facilitates the creation of manifests and templates that include resource definitions that map to existing resources in Bicep.
140+
The <xref:Aspire.Hosting.ExistingAzureResourceExtensions.PublishAsExisting*> method is used in "publish" mode when the intent is to declare and reference an already-existing Azure resource during publish mode. This API facilitates the creation of manifests and templates that include resource definitions that map to existing resources in Bicep.
137141

138142
To mark an Azure resource as existing in for the "publish" mode, call the `PublishAsExisting` method on the resource builder. Consider the following example:
139143

@@ -217,9 +221,9 @@ For more information on the generated Bicep template, see [Infrastructure as cod
217221
> [!WARNING]
218222
> When interacting with existing resources that require authentication, ensure the authentication strategy that you're configuring in the .NET Aspire application model aligns with the authentication strategy allowed by the existing resource. For example, it's not possible to use managed identity against an existing Azure PostgreSQL resource that isn't configured to allow managed identity. Similarly, if an existing Azure Redis resource disabled access keys, it's not possible to use access key authentication.
219223
220-
### Configure existing Azure resources
224+
### Configure existing Azure resources in all modes
221225

222-
The `AsExisting` method is used when the distributed application is running in "run" or "publish" mode. Because the `AsExisting` method operates in both scenarios, it only supports a parameterized reference to the resource name or resource group name. This approach helps prevent the use of the same resource in both testing and production environments.
226+
The <xref:Aspire.Hosting.ExistingAzureResourceExtensions.AsExisting``1(Aspire.Hosting.ApplicationModel.IResourceBuilder{``0},Aspire.Hosting.ApplicationModel.IResourceBuilder{Aspire.Hosting.ApplicationModel.ParameterResource},Aspire.Hosting.ApplicationModel.IResourceBuilder{Aspire.Hosting.ApplicationModel.ParameterResource})> method is used when the distributed application is running in "run" or "publish" mode. Because the `AsExisting` method operates in both scenarios, it only supports a parameterized reference to the resource name or resource group name. This approach helps prevent the use of the same resource in both testing and production environments.
223227

224228
To mark an Azure resource as existing, call the `AsExisting` method on the resource builder. Consider the following example:
225229

@@ -274,6 +278,8 @@ The preceding code:
274278

275279
The consuming API project uses the connection string information with no knowledge of how the app host configured it. In "publish" mode, the code adds a new Azure Storage resource—which would be reflected in the [deployment manifest](../deployment/manifest-format.md) accordingly. When in "run" mode the connection string corresponds to a configuration value visible to the app host. It's assumed that all role assignments for the target resource are configured. This means, you'd likely configure an environment variable or a user secret to store the connection string. The configuration is resolved from the `ConnectionStrings__storage` (or `ConnectionStrings:storage`) configuration key. These configuration values can be viewed when the app runs. For more information, see [Resource details](../fundamentals/dashboard/explore.md#resource-details).
276280

281+
Unlike existing resources modeled with [the first-class `AsExisting` API](#use-existing-azure-resources), existing resource modeled as connection strings cannot be enhanced with additional role assignments or infrastructure customizations.
282+
277283
## Infrastructure as code
278284

279285
The Azure SDK for .NET provides the [📦 Azure.Provisioning](https://www.nuget.org/packages/Azure.Provisioning) NuGet package and a suite of service-specific [Azure provisioning packages](https://www.nuget.org/packages?q=owner%3A+azure-sdk+description%3A+declarative+resource+provisioning&sortby=relevance). These Azure provisioning libraries make it easy to declaratively specify Azure infrastructure natively in .NET. Their APIs enable you to write object-oriented infrastructure in C#, resulting in Bicep. [Bicep is a domain-specific language (DSL)](/azure/azure-resource-manager/bicep/overview) for deploying Azure resources declaratively.

docs/azure/snippets/WebHook.Api/WebHook.Api.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<ItemGroup>
1010
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.2" />
11-
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
11+
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.3.0" />
1212
</ItemGroup>
1313

1414
</Project>

docs/community-toolkit/hosting-sql-database-projects.md

+16
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,22 @@ builder.AddSqlProject("mysqlproj")
108108
.WithReference(sql);
109109
```
110110

111+
## Support for existing SQL Server instances
112+
113+
Starting with version 9.2.0, you can publish the SQL Database project to an existing SQL Server instance by using a connection string:
114+
115+
```csharp
116+
var builder = DistributedApplication.CreateBuilder(args);
117+
118+
// Get an existing SQL Server connection string from the configuration
119+
var connection = builder.AddConnectionString("Aspire");
120+
121+
builder.AddSqlProject<Projects.SdkProject>("mysqlproj")
122+
.WithReference(connection);
123+
124+
builder.Build().Run();
125+
```
126+
111127
### Deployment options support
112128

113129
To define options that affect the behavior of package deployment, call the `WithConfigureDacDeployOptions` API:

docs/extensibility/snippets/MailDevResource/MailDevResource.NewsletterService/MailDevResource.NewsletterService.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<ItemGroup>
44
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.2" />
5-
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
5+
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.3.0" />
66
</ItemGroup>
77

88
<ItemGroup>

docs/extensibility/snippets/MailDevResourceAndComponent/MailDevResource.NewsletterService/MailDevResource.NewsletterService.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<ItemGroup>
44
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.2" />
5-
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
5+
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.3.0" />
66
</ItemGroup>
77

88
<ItemGroup>

docs/extensibility/snippets/MailDevResourceWithCredentials/MailDevResource.NewsletterService/MailDevResource.NewsletterService.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<ItemGroup>
44
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.2" />
5-
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
5+
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.3.0" />
66
</ItemGroup>
77

88
<ItemGroup>

docs/frameworks/snippets/Dapr/Dapr.AppHost/Dapr.AppHost.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
</ItemGroup>
1515
<ItemGroup>
1616
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.1.0" />
17-
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Dapr" Version="9.1.1-beta.177" />
17+
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Dapr" Version="9.2.0" />
1818
</ItemGroup>
1919
</Project>

docs/frameworks/snippets/Orleans/OrleansClient/OrleansClient.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Aspire.Azure.Data.Tables" Version="9.1.0" />
15-
<PackageReference Include="Microsoft.Orleans.Client" Version="9.0.1" />
16-
<PackageReference Include="Microsoft.Orleans.Clustering.AzureStorage" Version="9.0.1" />
15+
<PackageReference Include="Microsoft.Orleans.Client" Version="9.1.2" />
16+
<PackageReference Include="Microsoft.Orleans.Clustering.AzureStorage" Version="9.1.2" />
1717
<ProjectReference Include="..\OrleansContracts\OrleansContracts.csproj" />
1818
<ProjectReference Include="..\OrleansServiceDefaults\OrleansServiceDefaults.csproj" />
1919
</ItemGroup>

docs/frameworks/snippets/Orleans/OrleansContracts/OrleansContracts.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.Orleans.Sdk" Version="9.0.1" />
10+
<PackageReference Include="Microsoft.Orleans.Sdk" Version="9.1.2" />
1111
</ItemGroup>
1212
</Project>

docs/frameworks/snippets/Orleans/OrleansServer/OrleansServer.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.Orleans.Server" Version="9.0.1" />
15-
<PackageReference Include="Microsoft.Orleans.Persistence.AzureStorage" Version="9.0.1" />
16-
<PackageReference Include="Microsoft.Orleans.Clustering.AzureStorage" Version="9.0.1" />
14+
<PackageReference Include="Microsoft.Orleans.Server" Version="9.1.2" />
15+
<PackageReference Include="Microsoft.Orleans.Persistence.AzureStorage" Version="9.1.2" />
16+
<PackageReference Include="Microsoft.Orleans.Clustering.AzureStorage" Version="9.1.2" />
1717
<PackageReference Include="Aspire.Azure.Data.Tables" Version="9.1.0" />
1818
<PackageReference Include="Aspire.Azure.Storage.Blobs" Version="9.1.0" />
1919
<ProjectReference Include="..\OrleansContracts\OrleansContracts.csproj" />

0 commit comments

Comments
 (0)