Aspire.Azure.AI.Projects
17.0.0-preview.1.26567.5
Prefix Reserved
dotnet add package Aspire.Azure.AI.Projects --version 17.0.0-preview.1.26567.5
NuGet\Install-Package Aspire.Azure.AI.Projects -Version 17.0.0-preview.1.26567.5
<PackageReference Include="Aspire.Azure.AI.Projects" Version="17.0.0-preview.1.26567.5" />
<PackageVersion Include="Aspire.Azure.AI.Projects" Version="17.0.0-preview.1.26567.5" />
<PackageReference Include="Aspire.Azure.AI.Projects" />
paket add Aspire.Azure.AI.Projects --version 17.0.0-preview.1.26567.5
#r "nuget: Aspire.Azure.AI.Projects, 17.0.0-preview.1.26567.5"
#:package Aspire.Azure.AI.Projects@17.0.0-preview.1.26567.5
#addin nuget:?package=Aspire.Azure.AI.Projects&version=17.0.0-preview.1.26567.5&prerelease
#tool nuget:?package=Aspire.Azure.AI.Projects&version=17.0.0-preview.1.26567.5&prerelease
Aspire.Azure.AI.Projects library
Registers an Azure AI Projects AIProjectClient in the DI container as a singleton, with configuration binding, Microsoft Entra authentication, and tracing.
Getting started
Prerequisites
An Azure subscription, a Microsoft Foundry project, and a Microsoft Entra identity with access to the operations you use. Use a project endpoint such as https://account.services.ai.azure.com/api/projects/project, not an Azure OpenAI account endpoint, a Foundry Local endpoint, or a hub-based project's connection string.
Install the package
Install the Aspire Azure AI Projects library with NuGet:
dotnet add package Aspire.Azure.AI.Projects
Usage example
In the consuming application's Program.cs:
builder.AddAzureAIProjectClient("ai");
Supply the connection string through configuration:
{
"ConnectionStrings": {
"ai": "Endpoint=https://account.services.ai.azure.com/api/projects/project"
}
}
A bare project URI is also accepted. Project clients use Microsoft Entra authentication; Key connection strings are rejected rather than silently ignored. By default, Aspire uses a development credential locally and managed identity when deployed to Azure.
Resolve the singleton through dependency injection:
using Azure.AI.Projects;
public class AgentService(AIProjectClient projectClient)
{
public AIProjectClient ProjectClient => projectClient;
}
The client exposes project connections, deployments, datasets, AgentAdministrationClient, and ProjectOpenAIClient. Refer to the SDK documentation for individual operations and required permissions.
Keyed clients
builder.AddKeyedAzureAIProjectClient("ai");
var client = serviceProvider.GetRequiredKeyedService<AIProjectClient>("ai");
Each key identifies both the connection string and the registered service.
Configuration
Configuration is applied in this order: Aspire:Azure:AI:Projects, its connection-specific subsection, the named connection string, and finally configureSettings. SDK options are bound from the root and connection-specific ClientOptions sections before configureClientBuilder runs.
Use a connection string
Provide ConnectionStrings:ai as shown in the usage example. Both a bare project URI and Endpoint=https://account.services.ai.azure.com/api/projects/project are supported.
Use configuration providers
{
"Aspire": {
"Azure": {
"AI": {
"Projects": {
"DisableTracing": false,
"ai": {
"Endpoint": "https://account.services.ai.azure.com/api/projects/project",
"ClientOptions": {
"NetworkTimeout": "00:01:00"
}
}
}
}
}
}
}
Use inline delegates
Settings and SDK options can also be supplied in code, without a connection string:
using Azure.Identity;
using Microsoft.Extensions.Azure;
builder.AddAzureAIProjectClient("ai",
configureSettings: settings =>
{
settings.Endpoint = new Uri("https://account.services.ai.azure.com/api/projects/project");
settings.Credential = new AzureCliCredential();
},
configureClientBuilder: client => client.ConfigureOptions(options =>
{
options.NetworkTimeout = TimeSpan.FromSeconds(60);
}));
AppHost extensions
Install Aspire.Hosting.Foundry in the AppHost and reference the project from the consuming application:
dotnet add package Aspire.Hosting.Foundry
dotnet add package Aspire.Hosting.Dotnet
var foundry = builder.AddFoundry("foundry");
var project = foundry.AddProject("ai");
builder.AddDotnetProject("app", "../MyApp/MyApp.csproj")
.WithReference(foundry)
.WithReference(project);
WithReference(project) supplies the project connection string. The account reference configures runtime identity and Foundry access. Register builder.AddAzureAIProjectClient("ai") in MyApp. Deployment permissions and the application's runtime permissions are distinct; additional operations may require additional roles.
Telemetry and health checks
The integration subscribes to Azure.AI.Projects.* activity sources unless DisableTracing is true. Azure identity logs use the Azure.Identity category. Exporters are configured by the application's service defaults or OpenTelemetry setup.
No metrics or health check is registered. The integration does not perform inference or agent-management requests as a health probe.
Migration
Aspire.Azure.AI.OpenAI and Aspire.Azure.AI.Inference are no longer produced. Previously published versions remain available; this change does not uninstall them or retire the hosting integrations. See microsoft/aspire#20401.
Use this package for project and agent-management operations. For model clients, chat, embeddings, or Responses, use Aspire.Azure.AI.Extensions.OpenAI; its README describes the endpoint, authentication, and API migration. That package also offers AddAzureOpenAIClient for Azure OpenAI accounts with Entra or API-key authentication. Foundry Local continues using Aspire.OpenAI.
Additional documentation
Feedback & contributing
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- Azure.AI.Extensions.OpenAI (>= 3.0.0-beta.3)
- Azure.AI.Projects (>= 3.0.0-beta.3)
- Azure.AI.Projects.Agents (>= 3.0.0-beta.3)
- Azure.Core (>= 1.63.0)
- Azure.Storage.Blobs (>= 12.29.2)
- Microsoft.Extensions.Azure (>= 1.14.1)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.15)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.15)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.15)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Logging (>= 10.0.15)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Options (>= 10.0.15)
- Microsoft.Extensions.Primitives (>= 10.0.15)
- OpenAI (>= 2.14.0)
- OpenTelemetry.Extensions.Hosting (>= 1.18.0)
- System.IO.Hashing (>= 10.0.15)
-
net11.0
- Azure.AI.Extensions.OpenAI (>= 3.0.0-beta.3)
- Azure.AI.Projects (>= 3.0.0-beta.3)
- Azure.AI.Projects.Agents (>= 3.0.0-beta.3)
- Azure.Core (>= 1.63.0)
- Azure.Storage.Blobs (>= 12.29.2)
- Microsoft.Extensions.Azure (>= 1.14.1)
- Microsoft.Extensions.Configuration.Binder (>= 11.0.0)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 11.0.0)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 11.0.0)
- Microsoft.Extensions.Logging (>= 11.0.0)
- OpenAI (>= 2.14.0)
- OpenTelemetry.Extensions.Hosting (>= 1.18.0)
- System.IO.Hashing (>= 11.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 17.0.0-preview.1.26567.5 | 0 | 11/18/2026 |