Skip to content

Commit 263ead3

Browse files
authored
Fix invalidated xref's since API updates (#743)
* Fix invalidated xref's since API updates * Fix the two remaining errors
1 parent de21f94 commit 263ead3

16 files changed

+60
-58
lines changed

Diff for: docs/azureai/azureai-openai-component.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: .NET Aspire Azure AI OpenAI component
33
description: Learn how to use the .NET Aspire Azure AI OpenAI component.
44
ms.topic: how-to
5-
ms.date: 04/18/2024
5+
ms.date: 04/24/2024
66
---
77

88
# .NET Aspire Azure AI OpenAI component
@@ -40,10 +40,10 @@ For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-pac
4040
In the _Program.cs_ file of your component-consuming project, call the extension method to register an `OpenAIClient` for use via the dependency injection container. The method takes a connection name parameter.
4141

4242
```csharp
43-
builder.AddAzureOpenAI("openAiConnectionName");
43+
builder.AddAzureOpenAIClient("openAiConnectionName");
4444
```
4545

46-
In the preceding code, the <xref:Microsoft.Extensions.Hosting.AspireAzureOpenAIExtensions.AddAzureOpenAI%2A> method adds an `OpenAIClient` to the DI container. The `openAiConnectionName` parameter is the name of the connection string in the configuration. You can then retrieve the `OpenAIClient` instance using dependency injection. For example, to retrieve the connection from an example service:
46+
In the preceding code, the <xref:Microsoft.Extensions.Hosting.AspireAzureOpenAIExtensions.AddAzureOpenAIClient%2A> method adds an `OpenAIClient` to the DI container. The `openAiConnectionName` parameter is the name of the connection string in the configuration. You can then retrieve the `OpenAIClient` instance using dependency injection. For example, to retrieve the connection from an example service:
4747

4848
```csharp
4949
public class ExampleService(OpenAIClient client)

Diff for: docs/database/azure-cosmos-db-component.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: .NET Aspire Azure Cosmos DB component
33
description: This article describes the .NET Aspire Azure Cosmos DB component features and capabilities.
44
ms.topic: how-to
5-
ms.date: 04/18/2024
5+
ms.date: 04/24/2024
66
---
77

88
# .NET Aspire Azure Cosmos DB component
@@ -32,10 +32,10 @@ For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-pac
3232

3333
## Example usage
3434

35-
In the _Program.cs_ file of your component-consuming project, call the <xref:Microsoft.Extensions.Hosting.AspireAzureCosmosDBExtensions.AddAzureCosmosDB%2A> extension to register a <xref:Microsoft.Azure.Cosmos.CosmosClient?displayProperty=fullName> for use via the dependency injection container.
35+
In the _Program.cs_ file of your component-consuming project, call the <xref:Microsoft.Extensions.Hosting.AspireAzureCosmosDBExtensions.AddAzureCosmosDBClient%2A> extension to register a <xref:Microsoft.Azure.Cosmos.CosmosClient?displayProperty=fullName> for use via the dependency injection container.
3636

3737
```csharp
38-
builder.AddAzureCosmosDB("cosmosConnectionName");
38+
builder.AddAzureCosmosDBClient("cosmosConnectionName");
3939
```
4040

4141
You can then retrieve the `CosmosClient` instance using dependency injection. For example, to retrieve the client from a service:

Diff for: docs/database/azure-cosmos-db-entity-framework-component.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: .NET Aspire Microsoft Entity Framework Core Cosmos DB component
33
description: This article describes the .NET Aspire Microsoft Entity Framework Core Cosmos DB component features and capabilities.
44
ms.topic: how-to
5-
ms.date: 04/18/2024
5+
ms.date: 04/24/2024
66
---
77

88
# .NET Aspire Microsoft Entity Framework Core Cosmos DB component
@@ -80,7 +80,7 @@ var exampleProject = builder.AddProject<Projects.ExampleProject>()
8080
.WithReference(cosmosdbService);
8181
```
8282

83-
The <xref:Microsoft.Extensions.Hosting.AspireAzureCosmosDBExtensions.AddAzureCosmosDB%2A> method will read connection information from the AppHost's configuration under the `ConnectionStrings:cosmosdb` config key. The <xref:Aspire.Hosting.ResourceBuilderExtensions.WithReference%2A> method passes that connection information into a connection string named `cosmosdb` in the `ExampleProject` project. In the _Program.cs_ file of `cosmosdbService`, the connection can be consumed using:
83+
The <xref:Aspire.Hosting.AzureCosmosExtensions.AddAzureCosmosDB%2A> method will read connection information from the AppHost's configuration under the `ConnectionStrings:cosmosdb` config key. The <xref:Aspire.Hosting.ResourceBuilderExtensions.WithReference%2A> method passes that connection information into a connection string named `cosmosdb` in the `ExampleProject` project. In the _Program.cs_ file of `cosmosdbService`, the connection can be consumed using:
8484

8585
```csharp
8686
builder.AddAzureCosmosDB("cosmosdb");

Diff for: docs/fundamentals/networking-overview.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: .NET Aspire inner loop networking overview
33
description: Learn how .NET Aspire handles networking and service bindings, and how you can use them in your app code.
4-
ms.date: 04/22/2024
4+
ms.date: 04/24/2024
55
ms.topic: overview
66
---
77

@@ -33,7 +33,7 @@ To help visualize how service bindings work, consider the .NET Aspire starter te
3333

3434
When you call <xref:Aspire.Hosting.ProjectResourceBuilderExtensions.AddProject%2A>, the app host looks for _Properties/launchSettings.json_ to determine the default set of service bindings. The app host selects a specific launch profile using the following rules:
3535

36-
1. An explicit <xref:Aspire.Hosting.ProjectResourceBuilderExtensions.WithLaunchProfile%2A> call on the `IResourceBuilder<ProjectResource>`.
36+
1. An explicit `launchProfileName` argument passed when calling `AddProject`.
3737
1. The `DOTNET_LAUNCH_PROFILE` environment variable. For more information, see [.NET environment variables](/dotnet/core/tools/dotnet-environment-variables).
3838
1. The first launch profile defined in _launchSettings.json_.
3939

@@ -54,6 +54,8 @@ To specify that the **https** launch profile should be used, select the **https*
5454
> [!IMPORTANT]
5555
> If there's no _launchSettings.json_ (or launch profile), there are no bindings by default.
5656
57+
For more information, see [.NET Aspire and launch profiles](launch-profiles.md).
58+
5759
## Ports and proxies
5860

5961
When defining a service binding, the host port is *always* given to the proxy that sits in front of the service. This allows single or multiple replicas of a service to behave similarly. Additionally, all resource dependencies that use the <xref:Aspire.Hosting.ResourceBuilderExtensions.WithReference%2A> API rely of the proxy endpoint from the environment variable.

Diff for: docs/get-started/aspire-overview.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: .NET Aspire overview
33
description: Learn about .NET Aspire, an application stack designed to improve the experience of building cloud-native applications.
4-
ms.date: 03/10/2024
4+
ms.date: 04/24/2024
55
---
66

77
# .NET Aspire overview
@@ -53,10 +53,10 @@ Each component is designed to work with .NET Aspire orchestration, and they're c
5353
For example, consider the following code using the .NET Aspire Service Bus component:
5454

5555
```csharp
56-
builder.AddAzureServiceBus("servicebus");
56+
builder.AddAzureServiceBusClient("servicebus");
5757
```
5858

59-
The <xref:Microsoft.Extensions.Hosting.AspireServiceBusExtensions.AddAzureServiceBus%2A> method handles the following concerns:
59+
The <xref:Microsoft.Extensions.Hosting.AspireServiceBusExtensions.AddAzureServiceBusClient%2A> method handles the following concerns:
6060

6161
- Registers a <xref:Azure.Messaging.ServiceBus.ServiceBusClient> as a singleton in the DI container for connecting to Azure Service Bus.
6262
- Applies `ServiceBusClient` configurations either inline through code or through configuration.

Diff for: docs/messaging/azure-service-bus-component.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: .NET Aspire Azure Service Bus component
33
description: This article describes the .NET Aspire Azure Service Bus component features and capabilities
44
ms.topic: how-to
5-
ms.date: 04/18/2024
5+
ms.date: 04/24/2024
66
---
77

88
# .NET Aspire Azure Service Bus component
@@ -40,10 +40,10 @@ For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-pac
4040

4141
## Example usage
4242

43-
In the _Program.cs_ file of your component-consuming project, call the <xref:Microsoft.Extensions.Hosting.AspireServiceBusExtensions.AddAzureServiceBus%2A> extension to register a `ServiceBusClient` for use via the dependency injection container.
43+
In the _Program.cs_ file of your component-consuming project, call the <xref:Microsoft.Extensions.Hosting.AspireServiceBusExtensions.AddAzureServiceBusClient%2A> extension to register a `ServiceBusClient` for use via the dependency injection container.
4444

4545
```csharp
46-
builder.AddAzureServiceBus("messaging");
46+
builder.AddAzureServiceBusClient("messaging");
4747
```
4848

4949
To retrieve the configured <xref:Azure.Messaging.ServiceBus.ServiceBusClient> instance using dependency injection, require it as a constructor parameter. For example, to retrieve the client from an example service:

Diff for: docs/messaging/messaging-components.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Use .NET Aspire messaging components in ASP.NET Core
33
description: Learn how to connect an ASP.NET Core app to messaging services using .NET Aspire components.
4-
ms.date: 01/22/2024
4+
ms.date: 04/24/2024
55
ms.topic: tutorial
66
---
77

@@ -161,10 +161,10 @@ dotnet add package Aspire.Azure.Messaging.ServiceBus --prerelease
161161
In the _Program.cs_ file of the `AspireMessaging` Razor Pages project, add a call to the `AddAzureServiceBus` extension methods:
162162

163163
```csharp
164-
builder.AddAzureServiceBus("serviceBusConnection");
164+
builder.AddAzureServiceBusClient("serviceBusConnection");
165165
```
166166

167-
For more information, see <xref:Microsoft.Extensions.Hosting.AspireServiceBusExtensions.AddAzureServiceBus%2A>.
167+
For more information, see <xref:Microsoft.Extensions.Hosting.AspireServiceBusExtensions.AddAzureServiceBusClient%2A>.
168168

169169
This method accomplishes the following tasks:
170170

Diff for: docs/messaging/rabbitmq-client-component.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: .NET Aspire RabbitMQ component
33
description: Learn how to use the .NET Aspire RabbitMQ client message-broker component.
44
ms.topic: how-to
5-
ms.date: 01/22/2024
5+
ms.date: 04/24/2024
66
---
77

88
# .NET Aspire RabbitMQ component
@@ -32,10 +32,10 @@ For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-pac
3232

3333
## Example usage
3434

35-
In the _Program.cs_ file of your component-consuming project, call the <xref:Microsoft.Extensions.Hosting.AspireRabbitMQExtensions.AddRabbitMQ%2A> extension method to register an `IConnection` for use via the dependency injection container. The method takes a connection name parameter.
35+
In the _Program.cs_ file of your component-consuming project, call the <xref:Microsoft.Extensions.Hosting.AspireRabbitMQExtensions.AddRabbitMQClient%2A> extension method to register an `IConnection` for use via the dependency injection container. The method takes a connection name parameter.
3636

3737
```csharp
38-
builder.AddRabbitMQ("messaging");
38+
builder.AddRabbitMQClient("messaging");
3939
```
4040

4141
You can then retrieve the `IConnection` instance using dependency injection. For example, to retrieve the connection from an example service:

Diff for: docs/service-discovery/overview.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ To configure a service to resolve the "dashboard" endpoint on the "basket" servi
9191
9292
```csharp
9393
builder.Services.AddServiceDiscoveryCore();
94-
builder.Services.AddDnsSrvServiceEndPointResolver();
94+
builder.Services.AddDnsSrvServiceEndpointProvider();
9595
```
9696

97-
For more information, see <xref:Microsoft.Extensions.DependencyInjection.ServiceDiscoveryServiceCollectionExtensions.AddServiceDiscoveryCore%2A> and <xref:Microsoft.Extensions.Hosting.ServiceDiscoveryDnsServiceCollectionExtensions.AddDnsSrvServiceEndPointResolver%2A>.
97+
For more information, see <xref:Microsoft.Extensions.DependencyInjection.ServiceDiscoveryServiceCollectionExtensions.AddServiceDiscoveryCore%2A> and <xref:Microsoft.Extensions.Hosting.ServiceDiscoveryDnsServiceCollectionExtensions.AddDnsSrvServiceEndpointProvider%2A>.
9898

9999
The special port name "default" is used to specify the default endpoint, resolved using the URI `https://basket`.
100100

Diff for: docs/storage/azure-storage-blobs-component.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: .NET Aspire Azure Blob Storage component
33
description: This article describes the .NET Aspire Azure Blob Storage component features and capabilities.
44
ms.topic: how-to
5-
ms.date: 04/18/2024
5+
ms.date: 04/24/2024
66
---
77

88
# .NET Aspire Azure Blob Storage component
@@ -32,10 +32,10 @@ For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-pac
3232

3333
## Example usage
3434

35-
In the _Program.cs_ file of your component-consuming project, call the <xref:Microsoft.Extensions.Hosting.AspireBlobStorageExtensions.AddAzureBlobService%2A> extension to register a `BlobServiceClient` for use via the dependency injection container.
35+
In the _Program.cs_ file of your component-consuming project, call the <xref:Microsoft.Extensions.Hosting.AspireBlobStorageExtensions.AddAzureBlobClient%2A> extension to register a `BlobServiceClient` for use via the dependency injection container.
3636

3737
```csharp
38-
builder.AddAzureBlobService("blobs");
38+
builder.AddAzureBlobClient("blobs");
3939
```
4040

4141
You can then retrieve the `BlobServiceClient` instance using dependency injection. For example, to retrieve the client from a service:
@@ -79,7 +79,7 @@ var exampleProject = builder.AddProject<Projects.ExampleProject>()
7979
The <xref:Aspire.Hosting.AzureStorageExtensions.AddBlobs%2A> method will read connection information from the AppHost's configuration (for example, from "user secrets") under the `ConnectionStrings:blobs` config key. The <xref:Aspire.Hosting.ResourceBuilderExtensions.WithReference%2A> method passes that connection information into a connection string named blobs in the `ExampleProject` project. In the _Program.cs_ file of `ExampleProject`, the connection can be consumed using:
8080

8181
```csharp
82-
builder.AddAzureBlobService("blobs");
82+
builder.AddAzureBlobClient("blobs");
8383
```
8484

8585
## Configuration
@@ -88,10 +88,10 @@ The .NET Aspire Azure Blob Storage component provides multiple options to config
8888

8989
### Use a connection string
9090

91-
When using a connection string from the `ConnectionStrings` configuration section, you can provide the name of the connection string when calling `builder.AddAzureBlobService`:
91+
When using a connection string from the `ConnectionStrings` configuration section, you can provide the name of the connection string when calling `builder.AddAzureBlobClient`:
9292

9393
```csharp
94-
builder.AddAzureBlobService("blobs");
94+
builder.AddAzureBlobClient("blobs");
9595
```
9696

9797
And then the connection string will be retrieved from the `ConnectionStrings` configuration section. Two connection formats are supported:
@@ -149,15 +149,15 @@ The .NET Aspire Azure Blob Storage component supports <xref:Microsoft.Extensions
149149
You can also pass the `Action<AzureStorageBlobsSettings> configureSettings` delegate to set up some or all the options inline, for example to configure health checks:
150150

151151
```csharp
152-
builder.AddAzureBlobService(
152+
builder.AddAzureBlobClient(
153153
"blobs",
154154
static settings => settings.HealthChecks = false);
155155
```
156156

157-
You can also set up the `BlobClientOptions` using `Action<IAzureClientBuilder<BlobServiceClient, BlobClientOptions>> configureClientBuilder` delegate, the second parameter of the `AddAzureBlobService` method. For example, to set the first part of user-agent headers for all requests issues by this client:
157+
You can also set up the `BlobClientOptions` using `Action<IAzureClientBuilder<BlobServiceClient, BlobClientOptions>> configureClientBuilder` delegate, the second parameter of the `AddAzureBlobClient` method. For example, to set the first part of user-agent headers for all requests issues by this client:
158158

159159
```csharp
160-
builder.AddAzureBlobService(
160+
builder.AddAzureBlobClient(
161161
"blobs",
162162
static configureClientBuilder: clientBuilder =>
163163
clientBuilder.ConfigureOptions(

Diff for: docs/storage/azure-storage-components.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Connect an ASP.NET Core app to .NET Aspire storage components
33
description: Learn how to connect an ASP.NET Core app to .NET Aspire storage components.
4-
ms.date: 04/09/2024
4+
ms.date: 04/24/2024
55
ms.topic: tutorial
66
zone_pivot_groups: azure-storage-mechanism
77
ms.custom: devx-track-extended-azdevcli
@@ -215,7 +215,7 @@ Your **AspireStorage** project is now set up to use .NET Aspire components. Here
215215

216216
The next step is to add the components to the app.
217217

218-
In the _Program.cs_ file of the _AspireStorage_ project, add calls to the <xref:Microsoft.Extensions.Hosting.AspireBlobStorageExtensions.AddAzureBlobService%2A> and <xref:Microsoft.Extensions.Hosting.AspireQueueStorageExtensions.AddAzureQueueService%2A> extension methods after the creation of the `builder` but before the call to `AddServiceDefaults`. For more information, see [.NET Aspire service defaults](../fundamentals/service-defaults.md). Provide the name of your connection string as a parameter.
218+
In the _Program.cs_ file of the _AspireStorage_ project, add calls to the <xref:Microsoft.Extensions.Hosting.AspireBlobStorageExtensions.AddAzureBlobClient%2A> and <xref:Microsoft.Extensions.Hosting.AspireQueueStorageExtensions.AddAzureQueueClient%2A> extension methods after the creation of the `builder` but before the call to `AddServiceDefaults`. For more information, see [.NET Aspire service defaults](../fundamentals/service-defaults.md). Provide the name of your connection string as a parameter.
219219

220220
:::zone pivot="azurite"
221221

@@ -247,7 +247,7 @@ The worker service handles pulling messages off of the Azure Storage queue for p
247247
dotnet add package Aspire.Azure.Storage.Queues --prerelease
248248
```
249249

250-
In the _Program.cs_ file of the _AspireStorage.Worker_ project, add a call to the <xref:Microsoft.Extensions.Hosting.AspireQueueStorageExtensions.AddAzureQueueService%2A> extension method after the creation of the `builder` but before the call to `AddServiceDefaults`:
250+
In the _Program.cs_ file of the _AspireStorage.Worker_ project, add a call to the <xref:Microsoft.Extensions.Hosting.AspireQueueStorageExtensions.AddAzureQueueClient%2A> extension method after the creation of the `builder` but before the call to `AddServiceDefaults`:
251251

252252
:::code source="snippets/tutorial/AspireStorage/AspireStorage.Worker/Program.cs" highlight="5":::
253253

0 commit comments

Comments
 (0)