`) if you don’t name your backend `api`.
## SSR or Node.js app served by its own JavaScript resource
[Section titled “SSR or Node.js app served by its own JavaScript resource”](#ssr-or-nodejs-app-served-by-its-own-javascript-resource)
Use this shape when the JavaScript framework output should become the deployed web server and you do not need to attach the build output to a separate backend or gateway resource.
There are two common runtime shapes:
* Use `PublishAsNodeServer` when the build produces a self-contained server artifact that can run directly with `node`.
* Use `PublishAsPackageScript` when the production server starts through a package-manager script and needs production dependencies from `node_modules`.
### Built Node.js server artifact
[Section titled “Built Node.js server artifact”](#built-nodejs-server-artifact)
Use `PublishAsNodeServer` for frameworks that produce a self-contained Node.js server artifact during build, such as SvelteKit and TanStack Start. Aspire generates a runtime container that runs the built artifact directly with `node`.
Choose this method instead of `PublishAsPackageScript` when the build output does not need a production `node_modules` install at runtime. The resulting image can be smaller because it copies the server artifact rather than the full application with production dependencies.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
await builder.addDockerComposeEnvironment('compose');
const api = await builder
.addNodeApp('api', './frameworks/api', 'server.js')
.withHttpEndpoint({ port: 3001, env: 'PORT' })
.withExternalHttpEndpoints();
const apiEndpoint = await api.getEndpoint('http');
await builder
.addViteApp('sveltekit', './frameworks/sveltekit', { runScriptName: 'dev' })
.publishAsNodeServer('build/index.js', { outputPath: 'build' })
.withEnvironment('API_URL', apiEndpoint)
.withExternalHttpEndpoints();
await builder.build().run();
```
* C#
AppHost.cs
```csharp
#pragma warning disable ASPIREJAVASCRIPT001
var builder = DistributedApplication.CreateBuilder(args);
builder.AddDockerComposeEnvironment("compose");
var api = builder
.AddNodeApp("api", "./frameworks/api", "server.js")
.WithHttpEndpoint(port: 3001, env: "PORT")
.WithExternalHttpEndpoints();
var apiEndpoint = api.GetEndpoint("http");
var svelteApp = builder
.AddViteApp("sveltekit", "./frameworks/sveltekit", runScriptName: "dev")
.PublishAsNodeServer(entryPoint: "build/index.js", outputPath: "build")
.WithEnvironment("API_URL", apiEndpoint)
.WithExternalHttpEndpoints();
builder.Build().Run();
```
The generated container sets `HOST=0.0.0.0` and `HOSTNAME=0.0.0.0` so the Node.js server binds to all interfaces and is reachable inside the container network.
### Package-script server
[Section titled “Package-script server”](#package-script-server)
Use `PublishAsPackageScript` for SSR frameworks that start production by running a package-manager script, such as Nuxt, Astro SSR, and Remix. Aspire generates a multi-stage Dockerfile that installs production dependencies and uses the package manager script as the container entrypoint.
Choose this method instead of `PublishAsNodeServer` when the production server imports packages from `node_modules` at runtime or the framework’s recommended production command is a package script.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
await builder.addDockerComposeEnvironment('compose');
const api = await builder
.addNodeApp('api', './frameworks/api', 'server.js')
.withHttpEndpoint({ port: 3001, env: 'PORT' })
.withExternalHttpEndpoints();
const apiEndpoint = await api.getEndpoint('http');
await builder
.addViteApp('nuxt', './frameworks/nuxt', { runScriptName: 'dev' })
.publishAsPackageScript({ scriptName: 'start' })
.withEnvironment('API_URL', apiEndpoint)
.withEnvironment('NUXT_API_URL', apiEndpoint)
.withExternalHttpEndpoints();
await builder.build().run();
```
* C#
AppHost.cs
```csharp
#pragma warning disable ASPIREJAVASCRIPT001
var builder = DistributedApplication.CreateBuilder(args);
builder.AddDockerComposeEnvironment("compose");
var api = builder
.AddNodeApp("api", "./frameworks/api", "server.js")
.WithHttpEndpoint(port: 3001, env: "PORT")
.WithExternalHttpEndpoints();
var apiEndpoint = api.GetEndpoint("http");
var nuxtApp = builder
.AddViteApp("nuxt", "./frameworks/nuxt", runScriptName: "dev")
.PublishAsPackageScript(scriptName: "start")
.WithEnvironment("API_URL", apiEndpoint)
.WithEnvironment("NUXT_API_URL", apiEndpoint)
.WithExternalHttpEndpoints();
builder.Build().Run();
```
The generated container sets `HOST=0.0.0.0` and `HOSTNAME=0.0.0.0` so the server binds to all interfaces inside the container network.
### pnpm and Bun with PublishAsPackageScript
[Section titled “pnpm and Bun with PublishAsPackageScript”](#pnpm-and-bun-with-publishaspackagescript)
`PublishAsPackageScript` works with pnpm and Bun in addition to npm and Yarn. The generated runtime Dockerfile stage is tailored to the package manager:
* **pnpm**: The runtime stage runs `corepack enable pnpm && pnpm --version` before the entrypoint, so pnpm is available when the start script executes. Without this step, the container fails at startup with exit code 127 because pnpm is not included in the base `node:alpine` image.
* **Bun**: The runtime stage reuses the Bun build image rather than switching to a Node.js image, because `bun run
```
### Astro static
[Section titled “Astro static”](#astro-static)
Static Astro apps use `addViteApp` and `publishAsStaticWebsite`.
apphost.mts
```typescript
await builder
.addViteApp('astro', './frameworks/astro', { runScriptName: 'dev' })
.publishAsStaticWebsite({ apiPath: '/api', apiTarget: api })
.withExternalHttpEndpoints();
```
### Angular
[Section titled “Angular”](#angular)
Angular 17+ uses Vite internally. Use `addViteApp` with the Angular app’s dev script, then publish the build output as a static website.
apphost.mts
```typescript
await builder
.addViteApp('angular', './frameworks/angular', { runScriptName: 'dev' })
.publishAsStaticWebsite({ apiPath: '/api', apiTarget: api })
.withExternalHttpEndpoints();
```
Angular — proxy.conf.js
```javascript
const target = process.env.API_HTTPS || process.env.API_HTTP;
if (!target) {
throw new Error(
'API endpoint is not configured. Run the app through Aspire.'
);
}
module.exports = {
'/api': {
target,
secure: false,
changeOrigin: true,
},
};
```
Angular — src/app/weather.ts
```typescript
export async function loadWeather() {
const response = await fetch('/api/weather');
return response.json();
}
```
### Next.js
[Section titled “Next.js”](#nextjs)
Next.js standalone apps use the dedicated `addNextJsApp` helper, not a generic Vite app. Read Aspire-provided values from server-side code paths with `process.env`.
Experimental
`AddNextJsApp` is marked `[Experimental]`. In C# AppHosts, suppress the `ASPIREJAVASCRIPT001` diagnostic when you use this API.
apphost.mts
```typescript
await builder
.addNextJsApp('nextjs', './frameworks/nextjs', { runScriptName: 'dev' })
.withEnvironment('API_URL', apiEndpoint)
.withExternalHttpEndpoints();
```
Next.js — app/page.tsx
```tsx
export default async function Home() {
const apiUrl = process.env.API_URL;
if (!apiUrl) {
throw new Error('API_URL is not configured.');
}
const response = await fetch(`${apiUrl}/api/weather`, {
cache: 'no-store',
});
const weather = response.ok ? await response.json() : [];
return {JSON.stringify(weather, null, 2)};
}
```
### Nuxt
[Section titled “Nuxt”](#nuxt)
Nuxt apps need `node_modules` at runtime for server-side rendering, so publish them with `publishAsPackageScript`. Set both `API_URL` for direct server-side code and `NUXT_API_URL` for Nuxt runtime config.
apphost.mts
```typescript
await builder
.addViteApp('nuxt', './frameworks/nuxt', { runScriptName: 'dev' })
.publishAsPackageScript({ scriptName: 'start' })
.withEnvironment('API_URL', apiEndpoint)
.withEnvironment('NUXT_API_URL', apiEndpoint)
.withExternalHttpEndpoints();
```
Nuxt — nuxt.config.ts
```typescript
export default defineNuxtConfig({
nitro: {
preset: 'node-server',
},
runtimeConfig: {
apiUrl: '', // Overridden by NUXT_API_URL.
},
});
```
Nuxt — app/server/api/weather.ts
```typescript
export default defineEventHandler(async () => {
const config = useRuntimeConfig();
const apiUrl = config.apiUrl;
if (!apiUrl) {
throw new Error('NUXT_API_URL is not configured.');
}
return $fetch(`${apiUrl}/api/weather`);
});
```
### SvelteKit
[Section titled “SvelteKit”](#sveltekit)
SvelteKit with `@sveltejs/adapter-node` produces a self-contained Node server artifact, so publish it with `publishAsNodeServer`.
apphost.mts
```typescript
await builder
.addViteApp('sveltekit', './frameworks/sveltekit', { runScriptName: 'dev' })
.publishAsNodeServer('build/index.js', { outputPath: 'build' })
.withEnvironment('API_URL', apiEndpoint)
.withExternalHttpEndpoints();
```
SvelteKit — src/routes/+page.server.ts
```typescript
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ fetch }) => {
const apiUrl = process.env.API_URL;
if (!apiUrl) {
throw new Error('API_URL is not configured.');
}
const response = await fetch(`${apiUrl}/api/weather`);
return {
weather: response.ok ? await response.json() : [],
};
};
```
### TanStack Start
[Section titled “TanStack Start”](#tanstack-start)
TanStack Start uses Nitro’s Node server output and works with `publishAsNodeServer`.
apphost.mts
```typescript
await builder
.addViteApp('tanstack-start', './frameworks/tanstack-start', {
runScriptName: 'dev',
})
.publishAsNodeServer('.output/server/index.mjs', { outputPath: '.output' })
.withEnvironment('API_URL', apiEndpoint)
.withExternalHttpEndpoints();
```
### Astro SSR
[Section titled “Astro SSR”](#astro-ssr)
Astro SSR apps using `@astrojs/node` need runtime dependencies, so publish them with `publishAsPackageScript`.
apphost.mts
```typescript
await builder
.addViteApp('astro-ssr', './frameworks/astro-ssr', { runScriptName: 'dev' })
.publishAsPackageScript({ scriptName: 'start' })
.withEnvironment('API_URL', apiEndpoint)
.withExternalHttpEndpoints();
```
### Remix
[Section titled “Remix”](#remix)
Remix / React Router apps need `node_modules` at runtime. Pass the port argument through the package script so the server listens on Aspire’s assigned port.
apphost.mts
```typescript
await builder
.addViteApp('remix', './frameworks/remix', { runScriptName: 'dev' })
.publishAsPackageScript({
scriptName: 'start',
runScriptArguments: '-- --port "$PORT"',
})
.withEnvironment('API_URL', apiEndpoint)
.withExternalHttpEndpoints();
```
### Qwik City
[Section titled “Qwik City”](#qwik-city)
Qwik City apps need runtime dependencies and the Node server adapter, so publish them with `publishAsPackageScript`.
apphost.mts
```typescript
await builder
.addViteApp('qwik', './frameworks/qwik', { runScriptName: 'dev' })
.publishAsPackageScript({ scriptName: 'start' })
.withEnvironment('API_URL', apiEndpoint)
.withExternalHttpEndpoints();
```
After adding the framework resources your app needs, build and run the AppHost:
apphost.mts
```typescript
await builder.build().run();
```
## Add JavaScript application
[Section titled “Add JavaScript application”](#add-javascript-application)
The `AddJavaScriptApp` method is the foundational method for adding JavaScript applications to your Aspire AppHost. It provides a consistent way to orchestrate JavaScript applications with automatic package manager detection and intelligent defaults.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const api = await builder
.addNodeApp('api', './api', 'server.js')
.withHttpEndpoint({ port: 3001, env: 'PORT' });
const frontend = await builder
.addJavaScriptApp('frontend', './frontend')
.withHttpEndpoint({ port: 3000, env: 'PORT' })
.withReference(api);
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var api = builder
.AddNodeApp("api", "./api", "server.js")
.WithHttpEndpoint(port: 3001, env: "PORT");
var frontend = builder.AddJavaScriptApp("frontend", "./frontend")
.WithHttpEndpoint(port: 3000, env: "PORT")
.WithReference(api);
// After adding all resources, run the app...
```
By default, `AddJavaScriptApp`:
* Uses npm as the package manager when `package.json` is present
* Runs the “dev” script during local development
* Runs the “build” script when publishing to create production build output
* Can generate publish-time container build artifacts for that build output
The method accepts the following parameters:
* `name`: The name of the resource in the Aspire dashboard
* `appDirectory`: The path to the directory containing your JavaScript application (where `package.json` is located)
* `runScriptName` (optional): The name of the npm script to run when starting the application. Defaults to ‘dev’.
## Add Node.js application
[Section titled “Add Node.js application”](#add-nodejs-application)
For Node.js applications that don’t use a package.json script runner, you can directly run a JavaScript file using the `AddNodeApp` extension method:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const api = await builder
.addNodeApp('api', './api', 'server.js')
.withHttpEndpoint({ port: 3000, env: 'PORT' });
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var api = builder
.AddNodeApp("api", "./api", "server.js")
.WithHttpEndpoint(port: 3000, env: "PORT");
// After adding all resources, run the app...
```
The `AddNodeApp` method requires:
* **name**: The name of the resource in the Aspire dashboard
* **appDirectory**: The path to the directory containing the node application.
* **scriptPath** The path to the script relative to the app directory to run.
## Add Next.js application
[Section titled “Add Next.js application”](#add-nextjs-application)
Experimental
`AddNextJsApp` is marked `[Experimental]`. In C# AppHosts, suppress the `ASPIREJAVASCRIPT001` diagnostic when you use this API.
For [Next.js](https://nextjs.org/) applications, use the `AddNextJsApp` extension method. It provides Next.js-specific defaults for both run mode and publish mode:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const api = await builder
.addNodeApp('api', './api', 'server.js')
.withHttpEndpoint({ port: 3001, env: 'PORT' });
const nextApp = await builder
.addNextJsApp('next-app', './next-app')
.withReference(api);
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
#pragma warning disable ASPIREJAVASCRIPT001
var builder = DistributedApplication.CreateBuilder(args);
var api = builder
.AddNodeApp("api", "./api", "server.js")
.WithHttpEndpoint(port: 3001, env: "PORT");
var nextApp = builder.AddNextJsApp("next-app", "./next-app")
.WithReference(api);
// After adding all resources, run the app...
```
`AddNextJsApp` configures:
* **Run mode**: Starts `next dev` with the correct port binding (`-p` flag).
* **Publish mode**: Generates a multi-stage Dockerfile using Next.js [standalone output](https://nextjs.org/docs/pages/api-reference/next-config-js/output).
* **Deploy-time validation**: Checks `next.config.ts`, `next.config.js`, or `next.config.mjs` for `output: "standalone"` as a prerequisite step before building the container. Without standalone output, the generated Dockerfile will not work correctly.
Note
You must set `output: "standalone"` in your Next.js configuration for `AddNextJsApp` publish mode to work correctly:
next.config.js
```javascript
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
};
module.exports = nextConfig;
```
To opt out of the configuration validation step, call `DisableBuildValidation` / `disableBuildValidation`:
* TypeScript
apphost.mts
```typescript
const nextApp = await builder
.addNextJsApp('next-app', './next-app')
.disableBuildValidation();
```
* C#
AppHost.cs
```csharp
#pragma warning disable ASPIREJAVASCRIPT001
var nextApp = builder.AddNextJsApp("next-app", "./next-app")
.DisableBuildValidation();
```
For Next.js publish-method requirements (standalone output, copy shape, server components), see [Deploy JavaScript apps — Next.js gotchas](/deployment/javascript-apps/#nextjs).
## Add Vite application
[Section titled “Add Vite application”](#add-vite-application)
For Vite applications, you can use the `AddViteApp` extension method which provides Vite-specific defaults and optimizations:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const api = await builder
.addNodeApp('api', './api', 'server.js')
.withHttpEndpoint({ port: 3001, env: 'PORT' });
const viteApp = await builder
.addViteApp('vite-app', './vite-app')
.withReference(api);
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var api = builder
.AddNodeApp("api", "./api", "server.js")
.WithHttpEndpoint(port: 3001, env: "PORT");
var viteApp = builder.AddViteApp("vite-app", "./vite-app")
.WithReference(api);
// After adding all resources, run the app...
```
`AddViteApp` automatically configures:
* **HTTP endpoint**: Registers an `http` endpoint and sets the `PORT` environment variable — you don’t need to call `WithHttpEndpoint` yourself
* **Development script**: Runs the “dev” script (typically `vite`) during local development
* **Build script**: Runs the “build” script (typically `vite build`) when publishing
* **Package manager**: Uses npm by default, but can be customized with `WithYarn()`, `WithPnpm()`, or `WithBun()`
Caution
Do *not* call `.WithHttpEndpoint()` on a Vite resource. `AddViteApp` already registers an `http` endpoint with the `PORT` environment variable, and adding another causes a duplicate endpoint error at runtime.
Note
The Vite dev server is only used for local development. During publish, Aspire builds the frontend assets, but another resource must serve those built files in production. Use [Deploy JavaScript apps](/deployment/javascript-apps/) to choose which resource owns the production HTTP surface.
The method accepts the same parameters as `AddJavaScriptApp`:
* **name**: The name of the resource in the Aspire dashboard
* **appDirectory**: The path to the directory containing the Vite app.
* **runScriptName** (optional): The name of the script that runs the Vite app. Defaults to “dev”.
For framework-specific publish guidance — Vite/React/Vue, Angular, Astro, SvelteKit, TanStack Start, Nuxt, Remix, and Qwik — see [Deploy JavaScript apps — Framework-specific gotchas](/deployment/javascript-apps/#framework-specific-gotchas).
## Configure package managers
[Section titled “Configure package managers”](#configure-package-managers)
Aspire automatically detects and supports multiple JavaScript package managers with intelligent defaults for both development and production scenarios.
### Auto-install by default
[Section titled “Auto-install by default”](#auto-install-by-default)
Package managers automatically install dependencies by default. This ensures dependencies are always up-to-date during development and publishing.
### Use npm (default)
[Section titled “Use npm (default)”](#use-npm-default)
npm is the default package manager. If your project has a `package.json` file, Aspire will use npm unless you specify otherwise:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
// npm is used by default
const app = await builder.addJavaScriptApp('app', './app');
// Customize npm with additional flags
const customApp = await builder
.addJavaScriptApp('custom-app', './custom-app')
.withNpm({ installCommand: 'ci', installArgs: ['--legacy-peer-deps'] });
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
// npm is used by default
var app = builder.AddJavaScriptApp("app", "./app");
// Customize npm with additional flags
var customApp = builder.AddJavaScriptApp("custom-app", "./custom-app")
.WithNpm(installCommand: "ci", installArgs: ["--legacy-peer-deps"]);
// After adding all resources, run the app...
```
When publishing (production mode), Aspire automatically uses `npm ci` if `package-lock.json` exists, otherwise it uses `npm install` for deterministic builds.
### Use yarn
[Section titled “Use yarn”](#use-yarn)
To use yarn as the package manager, call `WithYarn` / `withYarn`:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const app = await builder.addJavaScriptApp('app', './app').withYarn();
// Customize yarn with additional flags
const customApp = await builder
.addJavaScriptApp('custom-app', './custom-app')
.withYarn({ installArgs: ['--immutable'] });
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var app = builder.AddJavaScriptApp("app", "./app")
.WithYarn();
// Customize yarn with additional flags
var customApp = builder.AddJavaScriptApp("custom-app", "./custom-app")
.WithYarn(installArgs: ["--immutable"]);
// After adding all resources, run the app...
```
When publishing, Aspire uses:
* `yarn install --immutable` if `yarn.lock` exists and yarn v2+ is detected
* `yarn install --frozen-lockfile` if `yarn.lock` exists with yarn v1
* `yarn install` otherwise
### Use pnpm
[Section titled “Use pnpm”](#use-pnpm)
To use pnpm as the package manager, call `WithPnpm` / `withPnpm`:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const app = await builder.addJavaScriptApp('app', './app').withPnpm();
// Customize pnpm with additional flags
const customApp = await builder
.addJavaScriptApp('custom-app', './custom-app')
.withPnpm({ installArgs: ['--frozen-lockfile'] });
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var app = builder.AddJavaScriptApp("app", "./app")
.WithPnpm();
// Customize pnpm with additional flags
var customApp = builder.AddJavaScriptApp("custom-app", "./custom-app")
.WithPnpm(installArgs: ["--frozen-lockfile"]);
// After adding all resources, run the app...
```
When publishing, Aspire uses `pnpm install --frozen-lockfile` if `pnpm-lock.yaml` exists, otherwise it uses `pnpm install`.
### Use Bun
[Section titled “Use Bun”](#use-bun)
To use Bun as the package manager, call `WithBun` / `withBun`:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const app = await builder.addViteApp('app', './app').withBun();
// Customize Bun with additional flags
const customApp = await builder
.addViteApp('custom-app', './custom-app')
.withBun({ installArgs: ['--frozen-lockfile'] });
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var app = builder.AddViteApp("app", "./app")
.WithBun();
// Customize Bun with additional flags
var customApp = builder.AddViteApp("custom-app", "./custom-app")
.WithBun(installArgs: ["--frozen-lockfile"]);
// After adding all resources, run the app...
```
When publishing, Aspire uses `bun install --frozen-lockfile` if `bun.lock` or `bun.lockb` exists, otherwise it uses `bun install`.
Bun supports passing script arguments without the `--` separator, so commands like `bun run dev --port 3000` work without needing `bun run dev -- --port 3000`.
When publishing to a container, `WithBun` / `withBun` automatically configures a Bun build image (`oven/bun:1`) since Bun is not available in the default Node.js base images. To use a specific Bun version, configure a custom build image:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const app = await builder
.addViteApp('app', './app')
.withBun()
.withDockerfileBaseImage({ buildImage: 'oven/bun:1.1' });
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
#pragma warning disable ASPIREDOCKERFILEBUILDER001
var builder = DistributedApplication.CreateBuilder(args);
var app = builder.AddViteApp("app", "./app")
.WithBun()
.WithDockerfileBaseImage(buildImage: "oven/bun:1.1");
// After adding all resources, run the app...
```
## Customize scripts
[Section titled “Customize scripts”](#customize-scripts)
You can customize which scripts run during development and build:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
// Use different script names
const app = await builder
.addJavaScriptApp('app', './app')
.withRunScript('start') // Run "npm run start" during development instead of "dev"
.withBuildScript('prod'); // Run "npm run prod" during publish instead of "build"
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
// Use different script names
var app = builder.AddJavaScriptApp("app", "./app")
.WithRunScript("start") // Run "npm run start" during development instead of "dev"
.WithBuildScript("prod"); // Run "npm run prod" during publish instead of "build"
// After adding all resources, run the app...
```
### Pass arguments to scripts
[Section titled “Pass arguments to scripts”](#pass-arguments-to-scripts)
To pass command-line arguments to your scripts, use `WithArgs` / `withArgs`:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const app = await builder
.addJavaScriptApp('app', './app')
.withRunScript('dev')
.withArgs(['--port', '3000', '--host']);
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var app = builder.AddJavaScriptApp("app", "./app")
.WithRunScript("dev")
.WithArgs("--port", "3000", "--host");
// After adding all resources, run the app...
```
Alternatively, you can define custom scripts in your `package.json` with arguments baked in:
package.json
```json
{
"scripts": {
"dev": "vite",
"dev:custom": "vite --port 3000 --host"
}
}
```
Then reference the custom script:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const app = await builder
.addJavaScriptApp('app', './app')
.withRunScript('dev:custom');
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var app = builder.AddJavaScriptApp("app", "./app")
.WithRunScript("dev:custom");
// After adding all resources, run the app...
```
## Configure endpoints
[Section titled “Configure endpoints”](#configure-endpoints)
JavaScript applications typically use environment variables to configure the port they listen on. Use `WithHttpEndpoint` / `withHttpEndpoint` to configure the port and set the environment variable:
Tip
`AddViteApp` already registers an `http` endpoint with the `PORT` environment variable. The following example applies to `AddJavaScriptApp` and `AddNodeApp` only.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const app = await builder
.addJavaScriptApp('app', './app')
.withHttpEndpoint({ port: 3000, env: 'PORT' });
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var app = builder.AddJavaScriptApp("app", "./app")
.WithHttpEndpoint(port: 3000, env: "PORT");
// After adding all resources, run the app...
```
Common environment variables for JavaScript frameworks:
* **PORT**: Generic port configuration used by many frameworks (Express, Vite, Next.js)
* **VITE\_PORT**: For Vite applications
* **HOST**: Some frameworks also use this to bind to specific interfaces
### Read referenced connection strings
[Section titled “Read referenced connection strings”](#read-referenced-connection-strings)
When you reference a resource that exposes a connection string, Aspire injects the connection string into the JavaScript app’s environment:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const postgres = await builder.addPostgres('postgres');
const db = await postgres.addDatabase('mydb');
const app = await builder
.addJavaScriptApp('app', './app')
.withHttpEndpoint({ port: 3000, env: 'PORT' });
await app.withReference(db);
// After adding all resources, run the app...
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var db = builder.AddPostgres("postgres").AddDatabase("mydb");
var app = builder.AddJavaScriptApp("app", "./app")
.WithHttpEndpoint(port: 3000, env: "PORT")
.WithReference(db);
// After adding all resources, run the app...
builder.Build().Run();
```
Read the connection string in your JavaScript code:
app.js
```javascript
const connectionString = process.env.ConnectionStrings__mydb;
```
For details about how resource names map to environment variable names, see [Environment variables](/fundamentals/environment-variables/).
## Customize Vite configuration
[Section titled “Customize Vite configuration”](#customize-vite-configuration)
For Vite applications, you can specify a custom configuration file if you need to override the default Vite configuration resolution behavior:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const viteApp = await builder
.addViteApp('vite-app', './vite-app')
// Path is relative to the Vite service project root
.withViteConfig('./vite.production.config.js');
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var viteApp = builder.AddViteApp("vite-app", "./vite-app")
// Path is relative to the Vite service project root
.WithViteConfig("./vite.production.config.js");
// After adding all resources, run the app...
```
The `WithViteConfig` / `withViteConfig` configuration accepts:
* **configPath**: The path to the Vite configuration file, relative to the Vite service project root.
This is useful when you have multiple Vite configuration files for different scenarios (development, staging, production).
### HTTPS configuration
[Section titled “HTTPS configuration”](#https-configuration)
Aspire automatically augments existing Vite configurations to enable HTTPS endpoints at runtime, eliminating manual certificate configuration for development. When you configure HTTPS endpoints on a Vite resource, Aspire dynamically injects the necessary HTTPS configuration:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const viteApp = await builder
.addViteApp('vite-app', './vite-app')
.withHttpsEndpoint({ env: 'PORT' })
.withHttpsDeveloperCertificate();
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
#pragma warning disable ASPIRECERTIFICATES001
var builder = DistributedApplication.CreateBuilder(args);
var viteApp = builder.AddViteApp("vite-app", "./vite-app")
.WithHttpsEndpoint(env: "PORT")
.WithHttpsDeveloperCertificate();
// After adding all resources, run the app...
```
The HTTPS configuration is automatically applied without modifying your `vite.config.js` file. For more information about certificate configuration, see [Certificate configuration](/app-host/certificate-configuration/).
## Pass API URLs to Vite apps
[Section titled “Pass API URLs to Vite apps”](#pass-api-urls-to-vite-apps)
When your Vite app needs to communicate with a backend API, pass the API URL via an environment variable. Vite only exposes variables prefixed with `VITE_` to client-side code.
In your AppHost, expose the API URL to the Vite app using `WithEnvironment` / `withEnvironment`:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const api = await builder
.addNodeApp('api', './api', 'server.js')
.withHttpEndpoint({ port: 3001, env: 'PORT' })
.withExternalHttpEndpoints();
const viteApp = await builder
.addViteApp('vite-app', './vite-app')
.withReference(api)
.withEnvironment('VITE_API_BASE_URL', await api.getEndpoint('http'));
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var api = builder
.AddNodeApp("api", "./api", "server.js")
.WithHttpEndpoint(port: 3001, env: "PORT")
.WithExternalHttpEndpoints();
var viteApp = builder.AddViteApp("vite-app", "./vite-app")
.WithReference(api)
.WithEnvironment("VITE_API_BASE_URL", api.GetEndpoint("http"));
// After adding all resources, run the app...
```
In your Vite app, read the variable from `import.meta.env`:
src/api.ts
```typescript
const apiBaseUrl = import.meta.env.VITE_API_BASE_URL;
export async function fetchData() {
const response = await fetch(`${apiBaseUrl}/api/data`);
return response.json();
}
```
Tip
`import.meta.env` variables are replaced at **build time** by Vite. For dynamic runtime values (such as a URL that changes per environment), consider using a server-rendered configuration endpoint instead. See [Pass runtime configuration to SPA frontends](#pass-runtime-configuration-to-spa-frontends).
## Pass runtime configuration to SPA frontends
[Section titled “Pass runtime configuration to SPA frontends”](#pass-runtime-configuration-to-spa-frontends)
Vite and other SPA build tools bake environment variables (such as `VITE_*`) into the JavaScript bundle at **build time** (for example, when building the client for production). However, Aspire sets environment variables at **runtime**. This means calling `WithEnvironment("VITE_GOOGLE_CLIENT_ID", parameter)` / `withEnvironment('VITE_GOOGLE_CLIENT_ID', parameter)` on a Vite resource won’t change values that were already baked into a previously built production bundle.
To bridge this gap, pass the parameter to your API app as a standard environment variable and expose it through a configuration endpoint that the SPA fetches at startup.
1. **Pass the parameter to the API in the AppHost**
Define the parameter in the AppHost and pass it to the API app using `WithEnvironment` / `withEnvironment`. Then reference the API from the frontend so it can call the endpoint:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const googleClientId = await builder.addParameter('google-client-id');
const api = await builder
.addNodeApp('api', './api', 'server.js')
.withHttpEndpoint({ port: 3001, env: 'PORT' })
.withEnvironment('GOOGLE_CLIENT_ID', googleClientId);
const frontend = await builder
.addViteApp('frontend', './frontend')
.withPnpm()
.withReference(api);
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var googleClientId = builder.AddParameter("google-client-id");
var api = builder
.AddNodeApp("api", "./api", "server.js")
.WithHttpEndpoint(port: 3001, env: "PORT")
.WithEnvironment("GOOGLE_CLIENT_ID", googleClientId);
var frontend = builder.AddViteApp("frontend", "./frontend")
.WithPnpm()
.WithReference(api);
// After adding all resources, run the app...
```
2. **Expose a config endpoint in the API**
Create an endpoint in your API app that reads the environment variable from `process.env` and returns it to the frontend:
api/server.js
```javascript
import http from 'node:http';
const port = process.env.PORT ?? 3000;
const clientId = process.env.GOOGLE_CLIENT_ID;
const server = http.createServer((request, response) => {
if (request.url !== '/api/config/google-client-id') {
response.writeHead(404).end();
return;
}
if (!clientId) {
response.writeHead(404).end();
return;
}
response.setHeader('content-type', 'application/json');
response.end(JSON.stringify({ clientId }));
});
server.listen(port);
```
Only expose public configuration
For multiple configuration values, consider grouping them under a single endpoint (such as `GET /api/config`) to reduce network requests.
Use this pattern only for non-secret/public configuration values (for example OAuth client IDs). Do not expose secrets such as client secrets, API keys, or connection strings via a frontend config endpoint.
3. **Fetch the config value in the SPA**
In your frontend application, fetch the configuration value at startup instead of reading from `import.meta.env`:
config.ts
```typescript
export async function getConfig() {
const response = await fetch('/api/config/google-client-id');
if (!response.ok) {
throw new Error('Failed to load configuration');
}
const { clientId } = await response.json();
return { googleClientId: clientId };
}
```
Note
This pattern applies to any SPA framework that bakes environment variables at build time, including apps added with `AddViteApp` or `AddJavaScriptApp`. For server-side rendered frameworks (such as Next.js or Nuxt), you can access Aspire environment variables directly with `process.env` at runtime from server-side code paths.
Environment variables that are bundled into client-side code (for example, `NEXT_PUBLIC_*` in Next.js) are still substituted at build time, so they should use a runtime configuration endpoint like the one shown above if they need values defined by Aspire at app startup.
## Monorepo and Turborepo patterns
[Section titled “Monorepo and Turborepo patterns”](#monorepo-and-turborepo-patterns)
Aspire supports **monorepo** layouts where multiple JavaScript apps share a single root workspace. Each app is added as a separate resource in the AppHost pointing to its own subdirectory.
### pnpm workspaces
[Section titled “pnpm workspaces”](#pnpm-workspaces)
For a **pnpm** monorepo, install dependencies from the workspace root and reference individual app directories:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const api = await builder
.addNodeApp('api', './apps/api', 'server.js')
.withHttpEndpoint({ port: 3001, env: 'PORT' });
// Each app lives in its own subdirectory with its own package.json
const frontend = await builder
.addViteApp('frontend', './apps/frontend')
.withPnpm()
.withReference(api);
const dashboard = await builder
.addViteApp('dashboard', './apps/dashboard')
.withPnpm()
.withReference(api);
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var api = builder
.AddNodeApp("api", "./apps/api", "server.js")
.WithHttpEndpoint(port: 3001, env: "PORT");
// Each app lives in its own subdirectory with its own package.json
var frontend = builder.AddViteApp("frontend", "./apps/frontend")
.WithPnpm()
.WithReference(api);
var dashboard = builder.AddViteApp("dashboard", "./apps/dashboard")
.WithPnpm()
.WithReference(api);
// After adding all resources, run the app...
```
Note
Each app directory must have its own `package.json` with a `dev` script. The `pnpm install` command should be run from the **monorepo root** before starting Aspire, so that the shared `node_modules` are populated.
### Turborepo
[Section titled “Turborepo”](#turborepo)
**Turborepo** orchestrates builds across a monorepo. Use a custom run script that delegates to the Turborepo pipeline for a specific app:
apps/frontend/package.json
```json
{
"scripts": {
"dev": "turbo run dev --filter=frontend"
}
}
```
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const api = await builder
.addNodeApp('api', './apps/api', 'server.js')
.withHttpEndpoint({ port: 3001, env: 'PORT' });
const frontend = await builder
.addJavaScriptApp('frontend', './apps/frontend')
.withPnpm()
.withRunScript('dev')
.withReference(api);
// After adding all resources, run the app...
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var api = builder
.AddNodeApp("api", "./apps/api", "server.js")
.WithHttpEndpoint(port: 3001, env: "PORT");
var frontend = builder.AddJavaScriptApp("frontend", "./apps/frontend")
.WithPnpm()
.WithRunScript("dev")
.WithReference(api);
// After adding all resources, run the app...
```
## Production builds
[Section titled “Production builds”](#production-builds)
When you publish your application, Aspire automatically:
1. Generates publish-time build artifacts for containerized deployment
2. Installs dependencies using deterministic install commands based on lockfiles
3. Runs the build script (typically “build”) to create production assets
4. Produces frontend build output that another resource can include or serve
This ensures your JavaScript applications are built consistently across environments and can participate in Aspire publishing workflows.
Production deployment rule
`AddJavaScriptApp` and `AddViteApp` are not, by themselves, the production web server for your frontend.
During publish, Aspire uses them to build frontend assets. To deploy that frontend, you must choose another resource to serve those built files in production. Start with [Deploy JavaScript apps](/deployment/javascript-apps/) to compare the supported production deployment shapes.
Publish and deploy validate this model. If a JavaScript resource is build-only and is not consumed by another resource, Aspire fails validation because that resource would not participate in the deployed app.
Adding `AddJavaScriptApp` or `AddViteApp` plus `.WithReference(...)` is not enough to make the frontend independently deployable.
Note
Local Vite proxy and route behavior does not automatically become production behavior. If your frontend depends on Vite development-server routing or proxy configuration, configure the production-serving resource separately.
For the production deployment patterns used by `AddJavaScriptApp` and `AddViteApp`, including who serves the built frontend in production, see [Deploy JavaScript apps](/deployment/javascript-apps/).
## See also
[Section titled “See also”](#see-also)
* [Environment variables](/fundamentals/environment-variables/) - How Aspire generates environment variable names from resources
* [External parameters](/fundamentals/external-parameters/) - Learn how to use parameters in Aspire
* [JavaScript monorepo hosting extensions](/integrations/frameworks/nodejs-extensions/) - Community Toolkit extensions for Nx and Turborepo workspaces
* [Deploy JavaScript apps](/deployment/javascript-apps/) - Production deployment patterns including `PublishAsStaticWebsite`, `PublishAsNodeServer`, and `PublishAsPackageScript`
* [What’s new in Aspire 13](/whats-new/aspire-13/) - Learn about first-class JavaScript support
* [Aspire integrations overview](/integrations/overview/)
* [Aspire GitHub repo](https://github.com/microsoft/aspire)
# JavaScript monorepo hosting extensions
> Add Nx and Turborepo workspaces to Aspire with Community Toolkit decorators for package managers, child apps, and mapped ports.
⭐ Community Toolkit 
The [📦 CommunityToolkit.Aspire.Hosting.JavaScript.Extensions](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.JavaScript.Extensions) package adds Nx and Turborepo monorepo support to the official [📦 Aspire.Hosting.JavaScript](https://www.nuget.org/packages/Aspire.Hosting.JavaScript) integration. Use the official package for individual Node.js, Vite, Next.js, and Bun apps; use this Community Toolkit package when an app belongs to an Nx or Turborepo workspace.
Start with an existing Nx or Turborepo workspace. Pass the workspace root as `workingDirectory`, then pass the Nx project name or Turborepo package name to `AddApp` / `addApp`. For Turborepo, the optional `filter` selects the package to run.
The extensions add:
* `AddNxApp` / `addNxApp` for an Nx workspace.
* `AddTurborepoApp` / `addTurborepoApp` for a Turborepo workspace.
* `AddApp` / `addApp` for apps within those workspaces.
* `WithNpm`, `WithYarn`, `WithPnpm`, and `WithBun` to select the workspace package manager.
* `WithPackageManagerLaunch` / `withPackageManagerLaunch` to launch the workspace through the selected package manager.
* `WithMappedEndpointPort` / `withMappedEndpointPort` to pass an Aspire endpoint’s allocated port to a JavaScript app.
## Hosting integration
[Section titled “Hosting integration”](#hosting-integration)
* TypeScript
Terminal
```bash
aspire add CommunityToolkit.Aspire.Hosting.JavaScript.Extensions
```
This command adds the package to `aspire.config.json` so Aspire can generate its TypeScript bindings.
* C#
* Aspire CLI
Aspire CLI — Add CommunityToolkit.Aspire.Hosting.JavaScript.Extensions package
```bash
aspire add communitytoolkit-javascript-extensions
```
The Aspire CLI is interactive, be sure to select the appropriate search result when prompted:
Aspire CLI — Example output prompt
```bash
Select an integration to add:
> communitytoolkit-javascript-extensions (CommunityToolkit.Aspire.Hosting.JavaScript.Extensions)
> Other results listed as selectable options...
```
Note
If there's only one result, the CLI selects it automatically. You'll still need to confirm the version.
* apphost.cs (C# file-based app)
C# — AppHost.cs
```csharp
#:package CommunityToolkit.Aspire.Hosting.JavaScript.Extensions@*
```
* PackageReference (\*.csproj)
XML — Add CommunityToolkit.Aspire.Hosting.JavaScript.Extensions package reference
```xml
```
* Aspire CLI
Aspire CLI — Add CommunityToolkit.Aspire.Hosting.JavaScript.Extensions package
```bash
aspire add communitytoolkit-javascript-extensions
```
The Aspire CLI is interactive, be sure to select the appropriate search result when prompted:
Aspire CLI — Example output prompt
```bash
Select an integration to add:
> communitytoolkit-javascript-extensions (CommunityToolkit.Aspire.Hosting.JavaScript.Extensions)
> Other results listed as selectable options...
```
Note
If there's only one result, the CLI selects it automatically. You'll still need to confirm the version.
* apphost.cs (C# file-based app)
C# — AppHost.cs
```csharp
#:package CommunityToolkit.Aspire.Hosting.JavaScript.Extensions@*
```
* PackageReference (\*.csproj)
XML — Add CommunityToolkit.Aspire.Hosting.JavaScript.Extensions package reference
```xml
```
## Add an Nx workspace app
[Section titled “Add an Nx workspace app”](#add-an-nx-workspace-app)
`AddNxApp` / `addNxApp` models the workspace. Add each runnable project with `AddApp` / `addApp`, then decorate that child app with the official JavaScript resource APIs it needs.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const nx = await builder.addNxApp('nx-workspace', {
workingDirectory: '../nx-demo',
});
await nx.withNpm(true);
await nx.withPackageManagerLaunch();
const blog = await nx.addApp('blog');
await blog.withHttpEndpoint({ env: 'PORT' });
await blog.withMappedEndpointPort();
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var nx = builder.AddNxApp("nx-workspace", "../nx-demo")
.WithNpm(install: true)
.WithPackageManagerLaunch();
nx.AddApp("blog")
.WithHttpEndpoint(env: "PORT")
.WithMappedEndpointPort();
builder.Build().Run();
```
## Add a Turborepo workspace app
[Section titled “Add a Turborepo workspace app”](#add-a-turborepo-workspace-app)
Use `AddTurborepoApp` / `addTurborepoApp` for a Turborepo workspace. The optional `filter` selects the workspace package to run.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const turbo = await builder.addTurborepoApp('turborepo', {
workingDirectory: '../turborepo-demo',
});
await turbo.withPnpm(true);
await turbo.withPackageManagerLaunch();
const web = await turbo.addApp('web', { filter: 'web' });
await web.withHttpEndpoint({ env: 'PORT' });
await web.withMappedEndpointPort();
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var turbo = builder.AddTurborepoApp("turborepo", "../turborepo-demo")
.WithPnpm(install: true)
.WithPackageManagerLaunch();
turbo.AddApp("web", filter: "web")
.WithHttpEndpoint(env: "PORT")
.WithMappedEndpointPort();
builder.Build().Run();
```
Use the official package for individual apps
`AddNodeApp`, `AddViteApp`, `AddNextJsApp`, and `AddBunApp`, together with the generic `WithNpm`, `WithYarn`, `WithPnpm`, and `WithBun` decorators for individual JavaScript resources, are provided by `Aspire.Hosting.JavaScript`. They aren’t APIs from this Community Toolkit package.
## See also
[Section titled “See also”](#see-also)
* [JavaScript integration](/integrations/frameworks/javascript/)
* [Nx documentation](https://nx.dev/)
* [Turborepo documentation](https://turbo.build/repo/docs)
* [Aspire Community Toolkit](https://github.com/CommunityToolkit/Aspire)
* [Aspire integrations overview](/integrations/overview/)
# Orleans integration
> Learn how to use the Aspire Orleans Hosting integration to orchestrate and configure an Orleans cluster in your Aspire solution.

This article is the reference for the Aspire Orleans Hosting integration. It enumerates the AppHost APIs — with examples for both `AppHost.cs` and `apphost.mts` — that you use to model an Orleans cluster in your [`AppHost`](/get-started/app-host/) project.
[Orleans](https://github.com/dotnet/orleans) is a cross-platform framework for building distributed applications that are elastically scalable and fault-tolerant. Unlike other Aspire integrations, the Orleans integration doesn’t create a container. Instead, the Orleans service is modeled as a resource in the AppHost and its configuration is propagated to any project that references it.
Note
This integration requires Orleans version 8.1.0 or later.
## Hosting integration
[Section titled “Hosting integration”](#hosting-integration)
To start building an Aspire app with Orleans, install the [📦 Aspire.Hosting.Orleans](https://www.nuget.org/packages/Aspire.Hosting.Orleans) NuGet package in your AppHost project:
* TypeScript
Terminal
```bash
aspire add Aspire.Hosting.Orleans
```
Learn more about [`aspire add`](/reference/cli/commands/aspire-add/) in the command reference.
This updates your `aspire.config.json` with the Orleans hosting integration package:
aspire.config.json
```diff
{
"packages": {
"Aspire.Hosting.Orleans": "13.5.3"
}
}
```
* C#
Terminal
```bash
aspire add Aspire.Hosting.Orleans
```
Learn more about [`aspire add`](/reference/cli/commands/aspire-add/) in the command reference.
Or, choose a manual installation approach:
AppHost.cs
```csharp
#:package Aspire.Hosting.Orleans@*
```
AppHost.csproj
```xml
```
### Add an Orleans resource
[Section titled “Add an Orleans resource”](#add-an-orleans-resource)
Call `addOrleans` (or `AddOrleans`) to add and return an Orleans service resource builder. The name provided to the Orleans resource is for diagnostic purposes. For most applications, a value of `"default"` suffices:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from "./.aspire/modules/aspire.mjs";
const builder = await createBuilder();
const orleans = await builder.addOrleans("default");
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var orleans = builder.AddOrleans("default");
// After adding all resources, run the app...
builder.Build().Run();
```
### Use Azure Storage for clustering and grain storage
[Section titled “Use Azure Storage for clustering and grain storage”](#use-azure-storage-for-clustering-and-grain-storage)
In an Orleans app, the fundamental building block is a **grain**. Grains can have durable states that must be persisted somewhere. **Azure Blob Storage** is one supported location.
Orleans hosts also register themselves in a membership table so silos can find each other and form a cluster. **Azure Table Storage** is a popular choice for this membership table.
To configure Orleans with Azure Storage clustering and grain storage, first install the [📦 Aspire.Hosting.Azure.Storage](https://www.nuget.org/packages/Aspire.Hosting.Azure.Storage) NuGet package in the AppHost project:
* Aspire CLI
Aspire CLI — Add Aspire.Hosting.Azure.Storage package
```bash
aspire add azure-storage
```
The Aspire CLI is interactive, be sure to select the appropriate search result when prompted:
Aspire CLI — Example output prompt
```bash
Select an integration to add:
> azure-storage (Aspire.Hosting.Azure.Storage)
> Other results listed as selectable options...
```
Note
If there's only one result, the CLI selects it automatically. You'll still need to confirm the version.
* apphost.cs (C# file-based app)
C# — AppHost.cs
```csharp
#:package Aspire.Hosting.Azure.Storage@*
```
* PackageReference (\*.csproj)
XML — Add Aspire.Hosting.Azure.Storage package reference
```xml
```
Then configure the Orleans resource with clustering and grain storage using `withClustering` (or `WithClustering`) and `withGrainStorage` (or `WithGrainStorage`):
* TypeScript
apphost.mts
```typescript
import { createBuilder } from "./.aspire/modules/aspire.mjs";
const builder = await createBuilder();
const storage = await builder.addAzureStorage("storage");
const clusteringTable = await storage.addTables("clustering");
const grainStorage = await storage.addBlobs("grainstate");
const orleans = await builder.addOrleans("default")
.withClustering(clusteringTable)
.withGrainStorage("Default", grainStorage);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var storage = builder.AddAzureStorage("storage");
var clusteringTable = storage.AddTables("clustering");
var grainStorage = storage.AddBlobs("grainstate");
var orleans = builder.AddOrleans("default")
.WithClustering(clusteringTable)
.WithGrainStorage("Default", grainStorage);
// After adding all resources, run the app...
builder.Build().Run();
```
Any project that references the Orleans resource also inherits a reference to the `clusteringTable` resource automatically.
### Add an Orleans server project
[Section titled “Add an Orleans server project”](#add-an-orleans-server-project)
Add a project to your solution as an Orleans server (a silo). Reference the Orleans resource from the server project so that it receives the clustering and storage configuration. In TypeScript AppHosts, use `withOrleansReference` to configure a project as a silo:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from "./.aspire/modules/aspire.mjs";
const builder = await createBuilder();
const storage = await builder.addAzureStorage("storage");
const clusteringTable = await storage.addTables("clustering");
const grainStorage = await storage.addBlobs("grainstate");
const orleans = await builder.addOrleans("default")
.withClustering(clusteringTable)
.withGrainStorage("Default", grainStorage);
const server = await builder.addProject("orleans-server", "../OrleansServer/OrleansServer.csproj")
.withOrleansReference(orleans);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var storage = builder.AddAzureStorage("storage");
var clusteringTable = storage.AddTables("clustering");
var grainStorage = storage.AddBlobs("grainstate");
var orleans = builder.AddOrleans("default")
.WithClustering(clusteringTable)
.WithGrainStorage("Default", grainStorage);
var server = builder.AddProject("orleans-server")
.WithReference(orleans);
// After adding all resources, run the app...
builder.Build().Run();
```
When you reference the Orleans resource from a project, the dependent storage resources are also referenced transitively.
### Add an Orleans client project
[Section titled “Add an Orleans client project”](#add-an-orleans-client-project)
Orleans clients communicate with grains hosted in an Orleans cluster. For example, a frontend web app calls grains running on Orleans servers. Reference the Orleans resource using `asClient()` (or `AsClient()`) so the project is configured as a client rather than a silo. In TypeScript AppHosts, use `withOrleansClientReference` for Orleans client references:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from "./.aspire/modules/aspire.mjs";
const builder = await createBuilder();
const storage = await builder.addAzureStorage("storage");
const clusteringTable = await storage.addTables("clustering");
const grainStorage = await storage.addBlobs("grainstate");
const orleans = await builder.addOrleans("default")
.withClustering(clusteringTable)
.withGrainStorage("Default", grainStorage);
const client = await builder.addProject("orleans-client", "../OrleansClient/OrleansClient.csproj")
.withOrleansClientReference(orleans.asClient());
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var storage = builder.AddAzureStorage("storage");
var clusteringTable = storage.AddTables("clustering");
var grainStorage = storage.AddBlobs("grainstate");
var orleans = builder.AddOrleans("default")
.WithClustering(clusteringTable)
.WithGrainStorage("Default", grainStorage);
var client = builder.AddProject("orleans-client")
.WithReference(orleans.AsClient());
// After adding all resources, run the app...
builder.Build().Run();
```
## Create the Orleans server project
[Section titled “Create the Orleans server project”](#create-the-orleans-server-project)
Now that the AppHost project is configured, implement the Orleans server project. Add the required NuGet packages:
Terminal
```bash
dotnet add package Aspire.Azure.Data.Tables
dotnet add package Aspire.Azure.Storage.Blobs
dotnet add package Microsoft.Orleans.Server
dotnet add package Microsoft.Orleans.Persistence.AzureStorage
dotnet add package Microsoft.Orleans.Clustering.AzureStorage
```
In the `Program.cs` file of the Orleans server project, add the Azure Storage blob and table clients, then call `UseOrleans`:
Program.cs
```csharp
var builder = WebApplication.CreateBuilder(args);
builder.AddKeyedAzureTableServiceClient("clustering");
builder.AddKeyedAzureBlobServiceClient("grainstate");
builder.UseOrleans();
var app = builder.Build();
app.Run();
```
### Example: CounterGrain implementation
[Section titled “Example: CounterGrain implementation”](#example-countergrain-implementation)
The following is a complete example of an Orleans server project, including a grain named `CounterGrain`:
Program.cs
```csharp
using Orleans;
var builder = WebApplication.CreateBuilder(args);
builder.AddKeyedAzureTableServiceClient("clustering");
builder.AddKeyedAzureBlobServiceClient("grainstate");
builder.UseOrleans();
var app = builder.Build();
app.Run();
public interface ICounterGrain : IGrainWithStringKey
{
Task GetCountAsync();
Task IncrementAsync();
}
[GenerateSerializer]
public class CounterState
{
[Id(0)]
public int Count { get; set; }
}
public class CounterGrain : Grain, ICounterGrain
{
private readonly IPersistentState _state;
public CounterGrain(
[PersistentState("count", "Default")] IPersistentState state)
{
_state = state;
}
public Task GetCountAsync() => Task.FromResult(_state.State.Count);
public async Task IncrementAsync()
{
_state.State.Count++;
await _state.WriteStateAsync();
return _state.State.Count;
}
}
```
## Create an Orleans client project
[Section titled “Create an Orleans client project”](#create-an-orleans-client-project)
In the Orleans client project, add the required NuGet packages:
Terminal
```bash
dotnet add package Aspire.Azure.Data.Tables
dotnet add package Aspire.Azure.Storage.Blobs
dotnet add package Microsoft.Orleans.Client
dotnet add package Microsoft.Orleans.Persistence.AzureStorage
dotnet add package Microsoft.Orleans.Clustering.AzureStorage
```
In the `Program.cs` file of the Orleans client project, add the Azure Table Storage client, then call `UseOrleansClient`:
Program.cs
```csharp
var builder = WebApplication.CreateBuilder(args);
builder.AddKeyedAzureTableServiceClient("clustering");
builder.UseOrleansClient();
var app = builder.Build();
app.MapGet("/", async (IGrainFactory grains) =>
{
var grain = grains.GetGrain("counter");
var count = await grain.IncrementAsync();
return Results.Ok(new { count });
});
app.Run();
```
The preceding code calls the `CounterGrain` grain defined in the Orleans server example above.
## Enable OpenTelemetry
[Section titled “Enable OpenTelemetry”](#enable-opentelemetry)
By convention, Aspire solutions include a *service defaults* project that defines shared configuration and behavior. To configure Orleans for OpenTelemetry, modify the `ConfigureOpenTelemetry` method in your service defaults project to add the Orleans meters and tracing sources:
ServiceDefaults.cs
```csharp
public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicationBuilder builder)
{
builder.Logging.AddOpenTelemetry(logging =>
{
logging.IncludeFormattedMessage = true;
logging.IncludeScopes = true;
});
builder.Services.AddOpenTelemetry()
.WithMetrics(metrics =>
{
metrics.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddRuntimeInstrumentation()
.AddMeter("Microsoft.Orleans");
})
.WithTracing(tracing =>
{
tracing.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddSource("Microsoft.Orleans.Runtime")
.AddSource("Microsoft.Orleans.Application");
});
builder.AddOpenTelemetryExporters();
return builder;
}
```
## Supported providers
[Section titled “Supported providers”](#supported-providers)
The Orleans Aspire integration supports a limited subset of Orleans providers:
**Clustering:**
* Redis
* Azure Storage Tables
**Persistence:**
* Redis
* Azure Storage Tables
* Azure Storage Blobs
**Reminders:**
* Redis
* Azure Storage Tables
**Grain directory:**
* Redis
* Azure Storage Tables
Streaming providers aren’t supported as of Orleans version 8.1.0.
## See also
[Section titled “See also”](#see-also)
* [Orleans on GitHub](https://github.com/dotnet/orleans)
* [Orleans documentation](https://learn.microsoft.com/dotnet/orleans/)
* [📦 Aspire.Hosting.Orleans](https://www.nuget.org/packages/Aspire.Hosting.Orleans)
* [📦 Aspire.Hosting.Azure.Storage](https://www.nuget.org/packages/Aspire.Hosting.Azure.Storage)
* [AppHost overview](/get-started/app-host/)
# Get started with the Perl hosting integration
> Run Perl scripts, APIs, modules, and executables in Aspire with local dependencies, dashboard visibility, and container publishing.
⭐ Community Toolkit 
The Aspire Community Toolkit Perl hosting integration runs Perl applications alongside the other resources in your AppHost. It models a Perl process as a first-class resource, manages its working directory and dependency installers, and supports local development and Dockerfile-based publishing.
## How the integration fits together
[Section titled “How the integration fits together”](#how-the-integration-fits-together)
The hosting package belongs in the AppHost. It creates an executable resource for your Perl application, while your project retains its scripts, modules, and dependency files.
```
architecture-beta
group apphost(server)[AppHost]
group perl(logos:perl)[Perl project]
service hosting(server)[Perl hosting integration] in apphost
service resource(logos:perl)[Perl app resource] in apphost
service runtime(logos:perl)[Perl runtime] in perl
service app(logos:perl)[Perl application] in perl
hosting:R --> L:resource
resource:R --> L:runtime
runtime:R --> L:app
```
## Prerequisites
[Section titled “Prerequisites”](#prerequisites)
* Install [Perl](https://www.perl.org/get.html) and ensure `perl` and `cpan` are on `PATH`.
* Install `cpanm` when you use `WithCpanMinus`, `WithLocalLib`, or project dependency installation without Carton. Install `carton` when you use Carton.
* Install the [Aspire CLI](/get-started/install-cli/) and create an AppHost.
Note
Perlbrew support is Linux-only. On Windows, use a supported Perl distribution; configuring perlbrew causes the resource to fail before it starts.
## Setup
[Section titled “Setup”](#setup)
### Add the hosting package
[Section titled “Add the hosting package”](#add-the-hosting-package)
Add `CommunityToolkit.Aspire.Hosting.Perl` to your AppHost. The [Perl hosting reference](/integrations/frameworks/perl/perl-host/#installation) includes package installation options.
### Add a Perl resource
[Section titled “Add a Perl resource”](#add-a-perl-resource)
Add a script resource and use a project-local module directory:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const worker = await builder.addPerlScript(
'worker',
'../perl-worker',
'worker.pl'
);
await worker.withLocalLib('local');
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
builder.AddPerlScript("worker", "../perl-worker", "worker.pl")
.WithLocalLib("local");
builder.Build().Run();
```
### Configure dependencies and endpoints
[Section titled “Configure dependencies and endpoints”](#configure-dependencies-and-endpoints)
The resource’s application directory is its working directory. Put a `cpanfile` there when you want Aspire to install project dependencies, and add an HTTP endpoint for a web API that listens on a port.
[Set up Perl in the AppHost](/integrations/frameworks/perl/perl-host/)
## See also
[Section titled “See also”](#see-also)
* [Perl documentation](https://perldoc.perl.org/)
* [Perl hosting reference](/integrations/frameworks/perl/perl-host/)
* [Aspire Community Toolkit](https://github.com/CommunityToolkit/Aspire)
# Set up Perl apps in the Aspire AppHost
> Configure Perl application resources in Aspire, including entrypoints, package managers, local libraries, endpoints, environment, and publishing.
⭐ Community Toolkit 
This reference describes the Community Toolkit Perl hosting integration APIs for the Aspire [AppHost](/get-started/app-host/). If you’re new to the integration, start with [Get started with the Perl integration](/integrations/frameworks/perl/perl-get-started/).
## Installation
[Section titled “Installation”](#installation)
Add [📦 CommunityToolkit.Aspire.Hosting.Perl](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Perl) to the AppHost:
* TypeScript
Terminal
```bash
aspire add CommunityToolkit.Aspire.Hosting.Perl
```
The command adds the package to `aspire.config.json`:
aspire.config.json
```json
{
"packages": {
"CommunityToolkit.Aspire.Hosting.Perl": "*"
}
}
```
* C#
Terminal
```bash
aspire add CommunityToolkit.Aspire.Hosting.Perl
```
Or add the package manually:
AppHost.cs
```csharp
#:package CommunityToolkit.Aspire.Hosting.Perl@*
```
Learn more about [`aspire add`](/reference/cli/commands/aspire-add/) in the command reference.
## Add a Perl resource
[Section titled “Add a Perl resource”](#add-a-perl-resource)
Each `AddPerl*` / `addPerl*` method accepts a resource name, an application directory, and an entrypoint. A relative application directory is resolved from the AppHost project directory and becomes the process working directory. Script paths are then resolved relative to that directory.
| API | Local command and arguments |
| ----------------------------------------- | ---------------------------------------------- |
| `AddPerlScript` / `addPerlScript` | `perl -s ` |
| `AddPerlApi` / `addPerlApi` | `perl daemon` |
| `AddPerlModule` / `addPerlModule` | `perl -M -e "->run()"` |
| `AddPerlExecutable` / `addPerlExecutable` | Runs `` directly |
* TypeScript
apphost.mts
```typescript
const script = await builder.addPerlScript(
'worker',
'../perl-worker',
'worker.pl'
);
const api = await builder.addPerlApi('api', '../perl-api', 'app.pl');
const module = await builder.addPerlModule(
'module-worker',
'../perl-module',
'MyApp::Worker'
);
const executable = await builder.addPerlExecutable(
'packed-app',
'../perl-bin',
'my-app'
);
```
* C#
AppHost.cs
```csharp
var script = builder.AddPerlScript("worker", "../perl-worker", "worker.pl");
var api = builder.AddPerlApi("api", "../perl-api", "app.pl");
var module = builder.AddPerlModule("module-worker", "../perl-module", "MyApp::Worker");
var executable = builder.AddPerlExecutable("packed-app", "../perl-bin", "my-app");
```
All entrypoints require `perl` and `cpan` to be available. Aspire adds the standard executable-resource lifecycle actions and process logs; the integration doesn’t add a Perl-specific dashboard command. `WithCpanMinus` and `WithCarton` add their own command requirement checks.
## Configure endpoints, arguments, and environment
[Section titled “Configure endpoints, arguments, and environment”](#configure-endpoints-arguments-and-environment)
Perl resources don’t add an HTTP endpoint or health check automatically. For an API, configure the application to listen on a port and add the standard AppHost endpoint. Use normal resource APIs such as `WithArgs` / `withArgs`, `WithReference` / `withReference`, and `WaitFor` / `waitFor` to supply arguments and model dependencies.
* TypeScript
apphost.mts
```typescript
const api = await builder.addPerlApi('api', '../perl-api', 'app.pl');
await api.withHttpEndpoint({ port: 3000, env: 'PORT' });
```
* C#
AppHost.cs
```csharp
var api = builder.AddPerlApi("api", "../perl-api", "app.pl")
.WithHttpEndpoint(port: 3000, env: "PORT");
```
The application must honor the configured port itself. For example, configure your Mojolicious or Dancer application to read `PORT`; adding an endpoint doesn’t change the framework’s listener arguments.
Every Perl resource configures OTLP export and sets `OTEL_TRACES_EXPORTER`, `OTEL_LOGS_EXPORTER`, `OTEL_METRICS_EXPORTER`, and their `OTEL_PERL_*` equivalents to `otlp`. It sets `OTEL_EXPORTER_OTLP_PROTOCOL` and `OTEL_PERL_EXPORTER_OTLP_PROTOCOL` to `http/protobuf`.
### Configure a local::lib
[Section titled “Configure a local::lib”](#configure-a-locallib)
`WithLocalLib` / `withLocalLib` isolates modules in a local directory. Relative paths are resolved from `appDirectory`; rooted paths are used as supplied. The default path is `local`.
It sets `PERL5LIB` to `/lib/perl5`, `PERL_LOCAL_LIB_ROOT` to ``, `PERL_MM_OPT` to `INSTALL_BASE=`, and `PERL_MB_OPT` to `--install_base `. If CPAN is active, the integration changes to cpanm because CPAN doesn’t support the needed `--local-lib` option.
* TypeScript
apphost.mts
```typescript
const worker = await builder.addPerlScript(
'worker',
'../perl-worker',
'worker.pl'
);
await worker.withLocalLib('local');
```
* C#
AppHost.cs
```csharp
var worker = builder.AddPerlScript("worker", "../perl-worker", "worker.pl")
.WithLocalLib("local");
```
### Trust development certificates
[Section titled “Trust development certificates”](#trust-development-certificates)
`WithPerlCertificateTrust` / `withPerlCertificateTrust` is experimental. When Aspire provides a certificate bundle, it sets `SSL_CERT_FILE`, `PERL_LWP_SSL_CA_FILE`, and `MOJO_CA_FILE` on the app and its dependency installers.
* TypeScript
apphost.mts
```typescript
await api.withPerlCertificateTrust();
```
* C#
AppHost.cs
```csharp
#pragma warning disable CTASPIREPERL001
api.WithPerlCertificateTrust();
#pragma warning restore CTASPIREPERL001
```
## Install dependencies
[Section titled “Install dependencies”](#install-dependencies)
The default package manager is CPAN. `WithPackage` / `withPackage` creates a child installer resource in run mode and makes the Perl app wait for it to complete. Use `force` to force an install and `skipTest` to skip package tests.
* TypeScript
apphost.mts
```typescript
const api = await builder.addPerlApi('api', '../perl-api', 'app.pl');
await api.withCpanMinus();
await api.withPackage('Mojolicious', false, true);
```
* C#
AppHost.cs
```csharp
var api = builder.AddPerlApi("api", "../perl-api", "app.pl")
.WithCpanMinus()
.WithPackage("Mojolicious", skipTest: true);
```
`WithCpanMinus` / `withCpanMinus` selects cpanm. With cpanm, per-package installers use `--force` and `--notest` for the corresponding options; with the default CPAN manager, they use `-f` and `-T`.
### Install dependencies from a cpanfile
[Section titled “Install dependencies from a cpanfile”](#install-dependencies-from-a-cpanfile)
`WithProjectDependencies` / `withProjectDependencies` creates one project installer in run mode. It expects `cpanfile` in the working directory:
* CPAN is automatically changed to cpanm, which runs `cpanm --installdeps --notest .`.
* Carton runs `carton install`. Set `cartonDeployment` to add `--deployment`; this requires `cpanfile.snapshot`.
* A project installer runs before individual package installers, and the application waits for them all to complete.
When the application directory contains `cpanfile`, `Makefile.PL`, or `Build.PL`, the integration automatically configures project dependency installation in run mode.
* TypeScript
apphost.mts
```typescript
const api = await builder.addPerlApi('api', '../perl-api', 'app.pl');
await api.withCpanMinus();
await api.withProjectDependencies();
const worker = await builder.addPerlScript(
'worker',
'../perl-worker',
'worker.pl'
);
await worker.withCarton();
await worker.withProjectDependencies(true);
```
* C#
AppHost.cs
```csharp
var api = builder.AddPerlApi("api", "../perl-api", "app.pl")
.WithCpanMinus()
.WithProjectDependencies();
var worker = builder.AddPerlScript("worker", "../perl-worker", "worker.pl")
.WithCarton()
.WithProjectDependencies(cartonDeployment: true);
```
`WithCarton` / `withCarton` and `WithPackage` / `withPackage` can’t be combined. Carton manages dependencies through the `cpanfile`; add the module there instead.
## Use perlbrew
[Section titled “Use perlbrew”](#use-perlbrew)
`WithPerlbrew` / `withPerlbrew` is an alias for `WithPerlbrewEnvironment` / `withPerlbrewEnvironment`. Both select a perlbrew version, accepting `5.40.0` or `perl-5.40.0`, and optionally accept the perlbrew root. The default root comes from `PERLBREW_ROOT` or `~/perl5/perlbrew`.
The integration switches the command to the selected Perl executable, sets `PERLBREW_ROOT`, `PERLBREW_PERL`, and `PERLBREW_HOME`, and prepends the Perl bin directory to `PATH`. `WithLocalLib` remains useful to keep project modules separate from the perlbrew installation.
Caution
Perlbrew is Linux-only. On Windows, the resource displays a notification and fails before starting. Use a Windows Perl distribution instead.
* TypeScript
apphost.mts
```typescript
const worker = await builder.addPerlScript(
'worker',
'../perl-worker',
'worker.pl'
);
await worker.withPerlbrew('5.40.0', '/opt/perlbrew');
const api = await builder.addPerlApi('api', '../perl-api', 'app.pl');
await api.withPerlbrewEnvironment('perl-5.40.0', '/opt/perlbrew');
```
* C#
AppHost.cs
```csharp
var worker = builder.AddPerlScript("worker", "../perl-worker", "worker.pl")
.WithPerlbrew("5.40.0", perlbrewRoot: "/opt/perlbrew");
var api = builder.AddPerlApi("api", "../perl-api", "app.pl")
.WithPerlbrewEnvironment("perl-5.40.0", perlbrewRoot: "/opt/perlbrew");
```
## Publish Perl apps
[Section titled “Publish Perl apps”](#publish-perl-apps)
In publish mode, Perl resources emit a generated Dockerfile. Dependency installer child resources exist only in run mode and are excluded from the manifest, so declare publish dependencies in `cpanfile`.
* The default cpanm Dockerfile uses `perl:5-slim`, installs cpanm, runs `cpanm --installdeps --notest .`, and starts the configured entrypoint.
* Carton uses a `perl:5` build stage and a `perl:5-slim` runtime stage. Publish mode uses `carton install --deployment` by default, unless configured otherwise.
* `WithLocalLib` carries `PERL5LIB` and `PERL_LOCAL_LIB_ROOT` into the generated image.
* A script, API, module, or executable retains its corresponding entrypoint form in the generated image.
## See also
[Section titled “See also”](#see-also)
* [Get started with the Perl integration](/integrations/frameworks/perl/perl-get-started/)
* [Perl documentation](https://perldoc.perl.org/)
* [CPAN::cpanfile reference](https://github.com/miyagawa/cpanfile/blob/master/README.md)
* [Aspire Community Toolkit](https://github.com/CommunityToolkit/Aspire)
# Get started with the PowerShell integration
> Use the Community Toolkit PowerShell integration to run managed scripts, model dependencies, and monitor their lifecycle in Aspire.
 ⭐ Community Toolkit
The Community Toolkit PowerShell hosting integration runs PowerShell scripts in an in-process runspace pool that Aspire manages. Model setup, provisioning, and administrative scripts alongside your application resources, view their logs and states in the dashboard, and make later scripts wait for earlier ones to finish.
## How the pieces fit together
[Section titled “How the pieces fit together”](#how-the-pieces-fit-together)
The integration is a hosting integration installed in your AppHost. A PowerShell runspace pool resource hosts one or more script resources. Aspire starts the pool, starts each script after its dependencies are ready, and reports the pool and script lifecycle in the dashboard.
```
architecture-beta
group apphost(server)[AppHost]
group scripts(server)[PowerShell resources]
service hosting(server)[PowerShell hosting integration] in apphost
service pool(server)[Runspace pool] in scripts
service script(server)[Script resource] in scripts
hosting:R --> L:pool
pool:R --> L:script
```
## Prerequisites
[Section titled “Prerequisites”](#prerequisites)
* Create an [Aspire AppHost](/get-started/app-host/) in C# or TypeScript.
* Optionally install [PowerShell](https://learn.microsoft.com/powershell/scripting/install/installing-powershell) to develop and test scripts outside the AppHost. The integration runs scripts in-process through the PowerShell SDK, so it doesn’t invoke `pwsh`.
1. ### Install the hosting package
[Section titled “Install the hosting package”](#install-the-hosting-package)
Add `CommunityToolkit.Aspire.Hosting.PowerShell` to your AppHost. You can use `aspire add communitytoolkit-powershell` or install the NuGet package directly.
2. ### Add a pool and a script
[Section titled “Add a pool and a script”](#add-a-pool-and-a-script)
Add a named PowerShell pool, then add a script to it. The following script appears as a resource in the dashboard.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const scripts = await builder.addPowerShell('scripts');
await scripts.addScript(
'setup',
'Write-Information "Preparing the application"'
);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var scripts = builder.AddPowerShell("scripts");
scripts.AddScript("setup", """
Write-Information "Preparing the application"
""");
builder.Build().Run();
```
3. ### Configure scripts in the AppHost
[Section titled “Configure scripts in the AppHost”](#configure-scripts-in-the-apphost)
Configure arguments, dependencies, connection-string variables, and lifecycle behavior in the [PowerShell AppHost reference](/integrations/frameworks/powershell/powershell-host/).
[Configure PowerShell resources](/integrations/frameworks/powershell/powershell-host/)
## See also
[Section titled “See also”](#see-also)
* [PowerShell documentation](https://learn.microsoft.com/powershell/)
* [PowerShell AppHost reference](/integrations/frameworks/powershell/powershell-host/)
* [Aspire Community Toolkit](https://github.com/CommunityToolkit/Aspire)
# Configure PowerShell scripts in the AppHost
> Configure PowerShell runspace pools, scripts, arguments, dependencies, dashboard actions, and lifecycle behavior in Aspire.
 ⭐ Community Toolkit
This reference describes the Community Toolkit PowerShell hosting integration. If you are new to it, begin with [Get started with the PowerShell integration](/integrations/frameworks/powershell/powershell-get-started/).
Prerequisites
Add the `CommunityToolkit.Aspire.Hosting.PowerShell` package to your AppHost. The integration hosts the PowerShell SDK in-process and doesn’t require the `pwsh` executable.
## Install the package
[Section titled “Install the package”](#install-the-package)
* TypeScript
Terminal
```bash
aspire add communitytoolkit-powershell
```
This adds the package to `aspire.config.json` and generates the TypeScript AppHost module.
* C#
Terminal
```bash
aspire add communitytoolkit-powershell
```
Or add [📦 CommunityToolkit.Aspire.Hosting.PowerShell](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.PowerShell) to the AppHost project.
## Add a runspace pool
[Section titled “Add a runspace pool”](#add-a-runspace-pool)
`AddPowerShell` / `addPowerShell` adds a runspace-pool resource. The resource name is shown in the dashboard. By default, the pool uses `ConstrainedLanguage` mode with one to five runspaces.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const scripts = await builder.addPowerShell('scripts', 'FullLanguage', 2, 8);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
using System.Management.Automation;
var builder = DistributedApplication.CreateBuilder(args);
var scripts = builder.AddPowerShell(
name: "scripts",
languageMode: PSLanguageMode.FullLanguage,
minRunspaces: 2,
maxRunspaces: 8);
builder.Build().Run();
```
Use the least-permissive language mode appropriate for the scripts you run. The C# overload that accepts `PSLanguageMode` is marked `[AspireExportIgnore]` because the enum isn’t ATS-compatible. The exported TypeScript bridge accepts the language-mode name as a string; invalid names fail while Aspire constructs the AppHost.
## Add scripts and arguments
[Section titled “Add scripts and arguments”](#add-scripts-and-arguments)
`AddScript` / `addScript` creates a child script resource. Aspire parses the script when the AppHost is built, starts it after the pool is running, and streams output, errors, warnings, information, verbose, and debug records to the resource logs.
Use `WithArgs` / `withArgs` to bind values to a PowerShell `param()` block. The C# `object[]` overload accepts values of any type but is marked `[AspireExportIgnore]` because `object[]` isn’t ATS-compatible. The exported TypeScript bridge accepts strings.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const scripts = await builder.addPowerShell('scripts');
await scripts
.addScript(
'process-data',
'param($count, $name) Write-Information "Processing $count items for $name"'
)
.withArgs(['5', 'demo']);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var scripts = builder.AddPowerShell("scripts");
scripts.AddScript("process-data", """
param($count, $name)
Write-Information "Processing $count items for $name"
""")
.WithArgs(5, "demo");
builder.Build().Run();
```
Scripts execute in the AppHost process’s current working directory. The integration has no `WithWorkingDirectory` API, so use absolute paths or set a location in the script when its file operations must be independent of the host’s launch directory.
The script resource implements the standard environment annotation interface, but the in-process runner doesn’t project those annotations into the runspace. A script can read environment variables inherited by the AppHost process through PowerShell’s `$env:` provider.
## Pass connection strings to scripts
[Section titled “Pass connection strings to scripts”](#pass-connection-strings-to-scripts)
In C#, `WithReference` on the runspace pool makes a connection string available as a read-only PowerShell variable. By default, the variable name is the referenced resource name. Pass `connectionName` to choose a different variable name. `optional: true` allows the connection string to be unavailable.
* TypeScript
The PowerShell-specific pool `WithReference` API is marked `[AspireExportIgnore]` because `IResourceBuilder` is not currently validated for ATS export in this integration. You can use standard TypeScript AppHost relationships such as `waitFor`, but they do not create a PowerShell connection-string variable.
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var cache = builder.AddRedis("cache");
var scripts = builder.AddPowerShell("scripts")
.WithReference(cache, connectionName: "redisConnection");
scripts.AddScript("seed", """
Write-Information "Redis connection: $redisConnection"
""");
builder.Build().Run();
```
The pool resolves these variables before it opens. This is distinct from an environment variable: the connection string is added to the PowerShell session state rather than to a process environment.
## Order scripts and resources
[Section titled “Order scripts and resources”](#order-scripts-and-resources)
Use `WaitFor` / `waitFor` for readiness dependencies. Each script automatically waits for its parent pool. Use `WaitForCompletion` / `waitForCompletion` when one script must finish before another script starts.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const scripts = await builder.addPowerShell('scripts');
const setup = await scripts.addScript(
'setup',
'Write-Information "Setting up"'
);
await scripts
.addScript('process', 'Write-Information "Processing after setup"')
.waitForCompletion(setup);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var scripts = builder.AddPowerShell("scripts");
var setup = scripts.AddScript("setup", """
Write-Information "Setting up"
""");
scripts.AddScript("process", """
Write-Information "Processing after setup"
""")
.WaitForCompletion(setup);
builder.Build().Run();
```
## Dashboard behavior, health, and publishing
[Section titled “Dashboard behavior, health, and publishing”](#dashboard-behavior-health-and-publishing)
The dashboard reports the pool state and each script’s invocation state. A completed script is a finite resource and reaches **Finished**; it is not an HTTP service. The integration does not add endpoints, HTTP health checks, or health probes for PowerShell resources.
While a script is running, its dashboard resource has a **Stop script execution** action. The action stops the PowerShell pipeline; it is disabled when the script is not running. You can use `Wait-Debugger` in a script and attach a PowerShell debugger to the AppHost process when diagnosing a script.
PowerShell pools and scripts are excluded from the deployment manifest. They run in the AppHost process during local orchestration and are not exported as container or deployment resources.
## See also
[Section titled “See also”](#see-also)
* [PowerShell documentation](https://learn.microsoft.com/powershell/)
* [Get started with the PowerShell integration](/integrations/frameworks/powershell/powershell-get-started/)
* [Aspire Community Toolkit](https://github.com/CommunityToolkit/Aspire)
# Python integration
> Add Python apps, modules, and ASGI services to an Aspire AppHost and orchestrate them alongside your other resources with full service discovery, environment injection, and debugging support.

The Aspire Python hosting integration lets you model Python scripts, modules, executables, and ASGI web apps as first-class resources in your [`AppHost`](/get-started/app-host/) project. Aspire manages virtual environment setup, injects connection strings and service URLs into the Python process, and wires up service discovery and observability automatically.
Community Toolkit package deprecated
As of Aspire 13, the official `Aspire.Hosting.Python` package is the recommended approach for Python hosting. The previous `CommunityToolkit.Aspire.Hosting.Python.Extensions` package is deprecated.
## Hosting integration
[Section titled “Hosting integration”](#hosting-integration)
* Aspire CLI
Aspire CLI — Add Aspire.Hosting.Python package
```bash
aspire add python
```
The Aspire CLI is interactive, be sure to select the appropriate search result when prompted:
Aspire CLI — Example output prompt
```bash
Select an integration to add:
> python (Aspire.Hosting.Python)
> Other results listed as selectable options...
```
Note
If there's only one result, the CLI selects it automatically. You'll still need to confirm the version.
* apphost.cs (C# file-based app)
C# — AppHost.cs
```csharp
#:package Aspire.Hosting.Python@*
```
* PackageReference (\*.csproj)
XML — Add Aspire.Hosting.Python package reference
```xml
```
### Migrate from the Community Toolkit package
[Section titled “Migrate from the Community Toolkit package”](#migrate-from-the-community-toolkit-package)
Remove the deprecated `CommunityToolkit.Aspire.Hosting.Python.Extensions` package reference, then install `Aspire.Hosting.Python`. Replace Toolkit-specific helpers with the official APIs that match the process you run:
* Use `AddUvicornApp` / `addUvicornApp` for ASGI apps.
* Replace `AddUvApp` with `AddPythonApp` / `addPythonApp` and `WithUv` / `withUv`.
* Use `AddPythonExecutable` / `addPythonExecutable` for an executable installed in the Python environment.
* Pass application arguments with `WithArgs` / `withArgs` instead of the deprecated `AddPythonApp` overloads that accept script arguments.
The examples in this article use only `Aspire.Hosting.Python`.
## Add Python app
[Section titled “Add Python app”](#add-python-app)
Use `AddPythonApp` to run a Python script directly:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const python = await builder.addPythonApp(
'python-api',
'../python-app',
'main.py'
);
await python.withHttpEndpoint({ port: 8000, env: 'PORT' });
const example = await builder.addProject(
'example',
'../ExampleProject/ExampleProject.csproj'
);
await example.withReference(python);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddPythonApp(
name: "python-api",
appDirectory: "../python-app",
scriptPath: "main.py")
.WithHttpEndpoint(port: 8000, env: "PORT");
builder.AddProject("example")
.WithReference(python);
builder.Build().Run();
```
`AddPythonApp` / `addPythonApp` requires:
* **name** — the resource name shown in the Aspire dashboard
* **appDirectory** — path to the directory containing your Python application
* **scriptPath** — the Python script to run, relative to `appDirectory`
## Add Python module
[Section titled “Add Python module”](#add-python-module)
Use `AddPythonModule` to run a Python module (the equivalent of `python -m `):
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const python = await builder.addPythonModule(
'python-module',
'../python-app',
'mymodule'
);
await python.withHttpEndpoint({ port: 8000, env: 'PORT' });
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddPythonModule(
name: "python-module",
appDirectory: "../python-app",
moduleName: "mymodule")
.WithHttpEndpoint(port: 8000, env: "PORT");
builder.Build().Run();
```
`AddPythonModule` / `addPythonModule` requires:
* **name** — the resource name shown in the Aspire dashboard
* **appDirectory** — path to the directory containing your Python application
* **moduleName** — the Python module to run
## Add Python executable
[Section titled “Add Python executable”](#add-python-executable)
Use `AddPythonExecutable` to run a CLI tool installed in the virtual environment (for example, `uvicorn` or a custom script):
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
// TypeScript: pass additional arguments via withArgs after creation
const python = await builder.addPythonExecutable(
'python-tool',
'../python-app',
'uvicorn'
);
await python.withArgs(['main:app', '--host', '0.0.0.0', '--port', '8000']);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddPythonExecutable(
name: "python-tool",
appDirectory: "../python-app",
executableName: "uvicorn")
.WithArgs("main:app", "--host", "0.0.0.0", "--port", "8000");
builder.Build().Run();
```
Note
In the TypeScript AppHost, `addPythonExecutable` accepts only `name`, `appDirectory`, and `executableName`. Pass additional command-line arguments by chaining `.withArgs(...)` after the resource is created.
## Add Uvicorn app
[Section titled “Add Uvicorn app”](#add-uvicorn-app)
For ASGI web frameworks like FastAPI, Starlette, and Quart, use `AddUvicornApp` which pre-configures Uvicorn as the ASGI server:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const python = await builder.addUvicornApp(
'python-api',
'../python-app',
'main:app'
);
await python.withHttpEndpoint({ port: 8000, env: 'PORT' });
const example = await builder.addProject(
'example',
'../ExampleProject/ExampleProject.csproj'
);
await example.withReference(python);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddUvicornApp(
name: "python-api",
appDirectory: "../python-app",
app: "main:app")
.WithHttpEndpoint(port: 8000, env: "PORT");
builder.AddProject("example")
.WithReference(python);
builder.Build().Run();
```
`AddUvicornApp` / `addUvicornApp` requires:
* **name** — the resource name shown in the Aspire dashboard
* **appDirectory** — path to the directory containing your Python application
* **app** — the ASGI application in `module:variable` format (for example, `main:app` for an `app` variable in `main.py`)
### Uvicorn configuration
[Section titled “Uvicorn configuration”](#uvicorn-configuration)
Configure Uvicorn worker count and log level through environment variables:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const python = await builder.addUvicornApp(
'python-api',
'../python-app',
'main:app'
);
await python.withHttpEndpoint({ port: 8000, env: 'PORT' });
await python.withEnvironment('UVICORN_WORKERS', '4');
await python.withEnvironment('UVICORN_LOG_LEVEL', 'info');
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddUvicornApp("python-api", "../python-app", "main:app")
.WithHttpEndpoint(port: 8000, env: "PORT")
.WithEnvironment("UVICORN_WORKERS", "4")
.WithEnvironment("UVICORN_LOG_LEVEL", "info");
builder.Build().Run();
```
Common Uvicorn environment variables:
* **UVICORN\_PORT** — port to listen on
* **UVICORN\_HOST** — host to bind to (default: `127.0.0.1`)
* **UVICORN\_WORKERS** — number of worker processes
* **UVICORN\_LOG\_LEVEL** — logging level (`debug`, `info`, `warning`, `error`)
## Virtual environment management
[Section titled “Virtual environment management”](#virtual-environment-management)
The Python hosting integration automatically detects and uses a virtual environment in the project directory. By default, if a `requirements.txt` or `pyproject.toml` is found, Aspire creates and activates a virtual environment before starting the app.
The official integration doesn’t expose a C# or TypeScript API to disable virtual environment management. Use the default `.venv` location or specify a different path.
### Custom virtual environment
[Section titled “Custom virtual environment”](#custom-virtual-environment)
To specify a custom virtual environment path, use `WithVirtualEnvironment`:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const python = await builder.addPythonApp(
'python-api',
'../python-app',
'main.py'
);
await python.withVirtualEnvironment('../python-app/.venv');
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddPythonApp("python-api", "../python-app", "main.py")
.WithVirtualEnvironment("../python-app/.venv");
builder.Build().Run();
```
## Package management
[Section titled “Package management”](#package-management)
### uv package manager
[Section titled “uv package manager”](#uv-package-manager)
Use `WithUv` to opt into the [uv](https://docs.astral.sh/uv/) package manager, which installs dependencies significantly faster than pip:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const python = await builder.addUvicornApp(
'python-api',
'../python-app',
'main:app'
);
await python.withUv();
await python.withHttpEndpoint({ port: 8000, env: 'PORT' });
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddUvicornApp("python-api", "../python-app", "main:app")
.WithUv()
.WithHttpEndpoint(port: 8000, env: "PORT");
builder.Build().Run();
```
### pip package manager
[Section titled “pip package manager”](#pip-package-manager)
Use `WithPip` to explicitly select pip:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const python = await builder.addPythonApp(
'python-api',
'../python-app',
'main.py'
);
await python.withPip();
await python.withHttpEndpoint({ port: 8000, env: 'PORT' });
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddPythonApp("python-api", "../python-app", "main.py")
.WithPip()
.WithHttpEndpoint(port: 8000, env: "PORT");
builder.Build().Run();
```
Tip
If neither `WithUv` nor `WithPip` is specified, Aspire automatically selects the package manager based on project files (`pyproject.toml` → uv, `requirements.txt` → pip).
## Configure endpoints
[Section titled “Configure endpoints”](#configure-endpoints)
Python apps typically read the port from an environment variable. Use `WithHttpEndpoint` to declare the port and inject the variable name:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const python = await builder.addUvicornApp(
'python-api',
'../python-app',
'main:app'
);
await python.withHttpEndpoint({ port: 8000, env: 'PORT' });
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddUvicornApp("python-api", "../python-app", "main:app")
.WithHttpEndpoint(port: 8000, env: "PORT");
builder.Build().Run();
```
### Multiple endpoints
[Section titled “Multiple endpoints”](#multiple-endpoints)
A Python app can expose more than one endpoint:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const python = await builder.addPythonApp(
'python-api',
'../python-app',
'main.py'
);
await python.withHttpEndpoint({ port: 8000, env: 'HTTP_PORT', name: 'http' });
await python.withHttpEndpoint({ port: 8443, env: 'HTTPS_PORT', name: 'https' });
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddPythonApp("python-api", "../python-app", "main.py")
.WithHttpEndpoint(port: 8000, env: "HTTP_PORT", name: "http")
.WithHttpEndpoint(port: 8443, env: "HTTPS_PORT", name: "https");
builder.Build().Run();
```
## Health checks
[Section titled “Health checks”](#health-checks)
Declare an HTTP health-check endpoint so Aspire knows when the app is ready:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const python = await builder.addUvicornApp(
'python-api',
'../python-app',
'main:app'
);
await python.withHttpEndpoint({ port: 8000, env: 'PORT' });
await python.withHttpHealthCheck('/health');
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddUvicornApp("python-api", "../python-app", "main:app")
.WithHttpEndpoint(port: 8000, env: "PORT")
.WithHttpHealthCheck("/health");
builder.Build().Run();
```
## Environment variables
[Section titled “Environment variables”](#environment-variables)
Inject arbitrary environment variables with `WithEnvironment`:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const python = await builder.addPythonApp(
'python-api',
'../python-app',
'main.py'
);
await python.withEnvironment('DEBUG', 'true');
await python.withEnvironment('LOG_LEVEL', 'debug');
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddPythonApp("python-api", "../python-app", "main.py")
.WithEnvironment("DEBUG", "true")
.WithEnvironment("LOG_LEVEL", "debug");
builder.Build().Run();
```
## Service discovery
[Section titled “Service discovery”](#service-discovery)
Reference other Aspire resources from a Python app using `WithReference`. Aspire injects the connection string as the `ConnectionStrings__` environment variable in the Python process:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const postgres = await builder.addPostgres('postgres');
const db = await postgres.addDatabase('mydb');
const python = await builder.addPythonApp(
'python-api',
'../python-app',
'main.py'
);
await python.withReference(db);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var db = builder.AddPostgres("postgres")
.AddDatabase("mydb");
var python = builder.AddPythonApp("python-api", "../python-app", "main.py")
.WithReference(db);
builder.Build().Run();
```
Read the connection string in Python using the `ConnectionStrings__mydb` environment variable (double-underscore separator for Python/shell environments):
main.py
```python
import os
connection_string = os.environ.get("ConnectionStrings__mydb")
```
For details about how resource names map to environment variable names, see [Environment variables](/fundamentals/environment-variables/).
## HTTPS configuration
[Section titled “HTTPS configuration”](#https-configuration)
By default, Python apps run over HTTP in local development. To enable HTTPS, use `WithHttpsEndpoint` together with `WithHttpsDeveloperCertificate`:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const python = await builder.addUvicornApp(
'python-api',
'../python-app',
'main:app'
);
await python.withHttpsEndpoint({ port: 8443, env: 'PORT' });
await python.withHttpsDeveloperCertificate();
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var python = builder.AddUvicornApp("python-api", "../python-app", "main:app")
.WithHttpsEndpoint(port: 8443, env: "PORT")
.WithHttpsDeveloperCertificate();
builder.Build().Run();
```
`WithHttpsDeveloperCertificate` exports the ASP.NET Core development certificate and injects it into the Python process as environment variables. Read those variables in your Uvicorn startup:
main.py
```python
import os
import uvicorn
if __name__ == "__main__":
ssl_keyfile = os.environ.get("ASPNETCORE_Kestrel__Certificates__Default__KeyPath")
ssl_certfile = os.environ.get("ASPNETCORE_Kestrel__Certificates__Default__Path")
uvicorn.run(
"main:app",
host="0.0.0.0",
port=int(os.environ.get("PORT", 8443)),
ssl_keyfile=ssl_keyfile,
ssl_certfile=ssl_certfile,
)
```
Note
HTTPS is needed primarily when your Python service is exposed externally. For internal service-to-service communication within an Aspire app, HTTP is sufficient.
## Internal versus external service exposure
[Section titled “Internal versus external service exposure”](#internal-versus-external-service-exposure)
By default, Aspire services are only accessible within the distributed application. Use `WithExternalHttpEndpoints` to expose a service to external traffic:
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const internalApi = await builder.addUvicornApp(
'internal-api',
'../internal-api',
'main:app'
);
await internalApi.withHttpEndpoint({ port: 8001, env: 'PORT' });
// internalApi is NOT exposed publicly — only reachable by other Aspire resources
const publicApi = await builder.addUvicornApp(
'public-api',
'../public-api',
'main:app'
);
await publicApi.withHttpEndpoint({ port: 8000, env: 'PORT' });
await publicApi.withExternalHttpEndpoints();
// publicApi IS exposed publicly
const frontend = await builder.addProject(
'frontend',
'../WebFrontend/WebFrontend.csproj'
);
await frontend.withReference(internalApi);
await frontend.withReference(publicApi);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var internalApi = builder.AddUvicornApp("internal-api", "../internal-api", "main:app")
.WithHttpEndpoint(port: 8001, env: "PORT");
// internalApi is NOT exposed publicly — only reachable by other Aspire resources
var publicApi = builder.AddUvicornApp("public-api", "../public-api", "main:app")
.WithHttpEndpoint(port: 8000, env: "PORT")
.WithExternalHttpEndpoints();
// publicApi IS exposed publicly
builder.AddProject("frontend")
.WithReference(internalApi)
.WithReference(publicApi);
builder.Build().Run();
```
Tip
Keep backend Python services (databases, AI inference, internal APIs) unexposed. Only expose services that browsers or external clients need to reach directly.
## Debugging
[Section titled “Debugging”](#debugging)
The Python hosting integration provides full debugging support in Visual Studio Code:
1. Install the [Aspire VS Code extension](/get-started/aspire-vscode-extension/)
2. Set breakpoints in your Python code
3. Run the Aspire app host
4. The debugger automatically attaches to your Python application
Tip
The Aspire VS Code extension automatically generates launch configurations for Python applications in your Aspire solution, enabling zero-configuration debugging.
## Deployment
[Section titled “Deployment”](#deployment)
When deploying your Aspire application, the Python hosting integration automatically generates production-ready Dockerfiles for your Python services:
```dockerfile
# Auto-generated Dockerfile
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "main.py"]
```
Note
The generated Dockerfile is tailored to your detected Python version and dependency configuration.
## See also
[Section titled “See also”](#see-also)
* [Environment variables](/fundamentals/environment-variables/) - How Aspire generates environment variable names from resources
* [📦 Aspire.Hosting.Python NuGet package](https://www.nuget.org/packages/Aspire.Hosting.Python)
* [Python language reference](https://docs.python.org/3/)
* [Uvicorn documentation](https://www.uvicorn.org/)
* [uv package manager documentation](https://docs.astral.sh/uv/)
* [FastAPI documentation](https://fastapi.tiangolo.com/)
* [Aspire integrations overview](/integrations/overview/)
* [Build your first Aspire app](/get-started/first-app/)
* [Deploy your first Aspire app](/get-started/deploy-first-app/)
* [Aspire GitHub repository](https://github.com/microsoft/aspire)
# Get started with the Rust integration
> Use the Community Toolkit Rust integration to run Cargo or Bacon applications, configure endpoints, and monitor them with Aspire.
 ⭐ Community Toolkit
The Community Toolkit Rust hosting integration runs Rust applications through Cargo or Bacon alongside the other resources in your Aspire AppHost. Rust app resources support endpoints, service discovery, health checks, environment configuration, and OpenTelemetry export. They are also configured for Dockerfile publishing.
## How the pieces fit together
[Section titled “How the pieces fit together”](#how-the-pieces-fit-together)
The integration is installed in the AppHost. The AppHost starts Cargo or Bacon in the Rust application’s working directory, applies standard Aspire resource configuration, and exposes the resulting resource in the dashboard.
```
architecture-beta
group apphost(server)[AppHost]
group rustapp(server)[Rust app]
service hosting(server)[Rust hosting integration] in apphost
service resource(logos:rust)[Rust app resource] in apphost
service toolchain(logos:rust)[Cargo or Bacon] in rustapp
service app(logos:rust)[Rust process] in rustapp
hosting:R --> L:resource
resource:R --> L:toolchain
toolchain:R --> L:app
```
## Prerequisites
[Section titled “Prerequisites”](#prerequisites)
* Install Rust with [rustup](https://www.rust-lang.org/tools/install) and make `cargo` available on your `PATH`.
* Install [Bacon](https://dystroy.org/bacon/) when you use `AddBaconApp` / `addBaconApp`.
* Create an [Aspire AppHost](/get-started/app-host/) in C# or TypeScript.
1. ### Install the hosting package
[Section titled “Install the hosting package”](#install-the-hosting-package)
Add `CommunityToolkit.Aspire.Hosting.Rust` to your AppHost. You can use `aspire add communitytoolkit-rust` or install the NuGet package directly.
2. ### Add a Rust app
[Section titled “Add a Rust app”](#add-a-rust-app)
Register the directory that contains your Rust project, then configure an endpoint for the port that the app reads from `PORT`.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const api = await builder.addRustApp('rust-api', '../rust-api');
await api.withHttpEndpoint({ port: 8080, env: 'PORT' });
await api.withExternalHttpEndpoints();
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
builder.AddRustApp("rust-api", "../rust-api")
.WithHttpEndpoint(port: 8080, env: "PORT")
.WithExternalHttpEndpoints();
builder.Build().Run();
```
3. ### Configure the app resource
[Section titled “Configure the app resource”](#configure-the-app-resource)
Choose Cargo or Bacon, pass command arguments, add health checks, and learn about publishing in the [Rust AppHost reference](/integrations/frameworks/rust/rust-host/).
[Configure Rust apps in the AppHost](/integrations/frameworks/rust/rust-host/)
## See also
[Section titled “See also”](#see-also)
* [Rust documentation](https://www.rust-lang.org/learn)
* [Cargo documentation](https://doc.rust-lang.org/cargo/)
* [Rust AppHost reference](/integrations/frameworks/rust/rust-host/)
* [Aspire Community Toolkit](https://github.com/CommunityToolkit/Aspire)
# Configure Rust apps in the AppHost
> Configure Cargo and Bacon applications, arguments, endpoints, health checks, telemetry, environment settings, and publishing in Aspire.
 ⭐ Community Toolkit
This reference describes the Community Toolkit Rust hosting integration. If you are new to it, begin with [Get started with the Rust integration](/integrations/frameworks/rust/rust-get-started/).
Prerequisites
Install [Rust and Cargo](https://www.rust-lang.org/tools/install). Install [Bacon](https://dystroy.org/bacon/) too when you use the Bacon resource API.
## Install the package
[Section titled “Install the package”](#install-the-package)
* TypeScript
Terminal
```bash
aspire add communitytoolkit-rust
```
This adds the package to `aspire.config.json` and generates the TypeScript AppHost module.
* C#
Terminal
```bash
aspire add communitytoolkit-rust
```
Or add [📦 CommunityToolkit.Aspire.Hosting.Rust](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Rust) to the AppHost project.
## Add a Cargo app
[Section titled “Add a Cargo app”](#add-a-cargo-app)
`AddRustApp` / `addRustApp` starts `cargo run` in the supplied working directory. The path is resolved relative to the AppHost directory, so it normally contains the Rust project’s `Cargo.toml`.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const api = await builder.addRustApp('rust-api', '../rust-api');
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var api = builder.AddRustApp("rust-api", "../rust-api");
builder.Build().Run();
```
## Pass Cargo arguments and choose a working directory
[Section titled “Pass Cargo arguments and choose a working directory”](#pass-cargo-arguments-and-choose-a-working-directory)
The optional `args` are appended after `cargo run`. For example, `--release` produces `cargo run --release`; use `--` before arguments intended for your Rust application. The working directory is normalized to the current platform after Aspire combines it with the AppHost directory.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const api = await builder.addRustApp('rust-api', '../rust-api', [
'--release',
'--',
'--environment',
'development',
]);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var api = builder.AddRustApp(
name: "rust-api",
workingDirectory: "../rust-api",
args: ["--release", "--", "--environment", "development"]);
builder.Build().Run();
```
## Add a Bacon app
[Section titled “Add a Bacon app”](#add-a-bacon-app)
`AddBaconApp` / `addBaconApp` runs the [Bacon](https://dystroy.org/bacon/) CLI from the working directory. Without arguments it runs `bacon run`; supply `args` to use another Bacon command.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const checks = await builder.addBaconApp('rust-checks', '../rust-api', [
'check',
]);
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var checks = builder.AddBaconApp(
name: "rust-checks",
workingDirectory: "../rust-api",
args: ["check"]);
builder.Build().Run();
```
## Configure endpoints, environment, and health checks
[Section titled “Configure endpoints, environment, and health checks”](#configure-endpoints-environment-and-health-checks)
Rust app resources support standard executable-resource configuration. Use `WithHttpEndpoint` / `withHttpEndpoint` to allocate a port and put it in an environment variable that the application reads. Use `WithHttpHealthCheck` / `withHttpHealthCheck` when the application exposes an HTTP health endpoint. `WithExternalHttpEndpoints` / `withExternalHttpEndpoints` makes an HTTP endpoint externally accessible.
* TypeScript
apphost.mts
```typescript
import { createBuilder } from './.aspire/modules/aspire.mjs';
const builder = await createBuilder();
const api = await builder.addRustApp('rust-api', '../rust-api');
await api.withEnvironment('RUST_LOG', 'info');
await api.withHttpEndpoint({ port: 8080, env: 'PORT' });
await api.withExternalHttpEndpoints();
await api.withHttpHealthCheck({ path: '/health' });
await builder.build().run();
```
* C#
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var api = builder.AddRustApp("rust-api", "../rust-api")
.WithEnvironment("RUST_LOG", "info")
.WithHttpEndpoint(port: 8080, env: "PORT")
.WithExternalHttpEndpoints()
.WithHttpHealthCheck("/health");
builder.Build().Run();
```
The integration configures the Rust app with the OpenTelemetry Protocol exporter. Add OpenTelemetry instrumentation to the Rust application to emit telemetry to Aspire. You can also use standard resource references to model dependencies and provide their configuration to the Rust process.
The dashboard exposes the standard executable-resource lifecycle actions and process logs. The integration doesn’t add Rust-specific dashboard commands.
## Publish Rust apps
[Section titled “Publish Rust apps”](#publish-rust-apps)
Both Cargo and Bacon app resources are configured as Dockerfile-published resources when they are added. During `aspire publish`, Aspire converts the executable resource to a container resource and uses the Rust app’s working directory as the Docker build context. Include a suitable `Dockerfile` there. The local Cargo or Bacon arguments are cleared for the containerized resource, so configure the Dockerfile with the command and arguments it needs.
## See also
[Section titled “See also”](#see-also)
* [Rust documentation](https://www.rust-lang.org/learn)
* [Cargo documentation](https://doc.rust-lang.org/cargo/)
* [Bacon documentation](https://dystroy.org/bacon/)
* [Get started with the Rust integration](/integrations/frameworks/rust/rust-get-started/)
* [Aspire Community Toolkit](https://github.com/CommunityToolkit/Aspire)
# WPF and Windows Forms with Aspire
> Learn how to orchestrate WPF and Windows Forms desktop applications alongside Aspire-managed backend services during local development.

WPF (Windows Presentation Foundation) and Windows Forms are .NET desktop UI frameworks for building Windows applications. Because they are standard .NET projects, you can register them in an Aspire AppHost alongside your backend services using the same `AddProject` API you use for web and worker services. Aspire then starts and monitors the desktop app as a local process resource when you run the AppHost during development.
Note
WPF and Windows Forms applications require Windows and are **not** containerized or included in [`aspire deploy`](/reference/cli/commands/aspire-deploy/) output. Aspire orchestrates them as local processes during development only. For production deployment, use your existing desktop tooling (MSIX, ClickOnce, and so on).
## Add WPF or Windows Forms to the AppHost
[Section titled “Add WPF or Windows Forms to the AppHost”](#add-wpf-or-windows-forms-to-the-apphost)
No additional NuGet package is required. Add the desktop project reference to the AppHost and call `AddProject` to register it.
1. **Add a project reference** from your AppHost `.csproj` to the WPF or Windows Forms project:
AppHost.csproj
```xml
```
2. **Register the project** in your AppHost and wire up any service references it needs:
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var api = builder.AddProject("api");
builder.AddProject("desktop")
.WithReference(api)
.WaitFor(api);
// After adding all resources, run the app...
builder.Build().Run();
```
When you run the AppHost, the desktop application starts automatically as a process resource alongside all other registered services.
3. **Add service discovery** to the desktop project so it can resolve Aspire-managed service addresses at runtime. Reference the `Aspire.ServiceDefaults` project (or install `Microsoft.Extensions.ServiceDiscovery` directly), then configure the generic host in your startup code.
For **WPF**, override `OnStartup` in `App.xaml.cs`:
App.xaml.cs (WPF)
```csharp
public partial class App : Application
{
public IServiceProvider Services { get; private set; } = default!;
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
var host = Host.CreateDefaultBuilder()
.ConfigureServices(services =>
{
services.AddServiceDiscovery();
services.AddHttpClient(client =>
{
client.BaseAddress = new Uri("https+http://api");
}).AddServiceDiscovery();
})
.Build();
Services = host.Services;
host.Start();
}
}
```
For **Windows Forms**, configure the host in `Program.cs`:
Program.cs (Windows Forms)
```csharp
var host = Host.CreateDefaultBuilder(args)
.ConfigureServices(services =>
{
services.AddServiceDiscovery();
services.AddHttpClient(client =>
{
client.BaseAddress = new Uri("https+http://api");
}).AddServiceDiscovery();
services.AddTransient();
})
.Build();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(host.Services.GetRequiredService());
```
Tip
The `https+http://` scheme tells the HTTP client to prefer HTTPS but fall back to HTTP. The service name (`api`) must match the resource name defined in your `AppHost.cs`.
## Dev-only orchestration
[Section titled “Dev-only orchestration”](#dev-only-orchestration)
A common pattern is to register the desktop app only during local development and skip it in CI or staging environments. Use `builder.Environment.IsDevelopment()` to add the resource conditionally:
AppHost.cs
```csharp
var builder = DistributedApplication.CreateBuilder(args);
var postgres = builder.AddPostgres("postgres")
.AddDatabase("mydb");
var api = builder.AddProject("api")
.WithReference(postgres);
if (builder.Environment.IsDevelopment())
{
builder.AddProject("desktop")
.WithReference(api)
.WaitFor(api);
}
// After adding all resources, run the app...
builder.Build().Run();
```
## Limitations
[Section titled “Limitations”](#limitations)
* **Windows only**: WPF and Windows Forms require Windows. On macOS or Linux, the desktop resource will fail to start because the .NET WPF/WinForms runtime is unavailable on those platforms.
* **No deployment support**: [`aspire deploy`](/reference/cli/commands/aspire-deploy/) does not produce deployment artifacts for desktop apps. They are treated as development-time resources only.
* **Dashboard lifecycle**: Desktop apps start automatically when the AppHost runs. They cannot be started or stopped on demand from the Aspire dashboard the same way containerized services can.
## Comparison with .NET MAUI
[Section titled “Comparison with .NET MAUI”](#comparison-with-net-maui)
| Feature | WPF / WinForms | .NET MAUI |
| --------------------------------- | --------------------------------- | ---------------------------- |
| Aspire hosting package | None — uses standard `AddProject` | `Aspire.Hosting.Maui` |
| Platform support | Windows only | Windows, macOS, iOS, Android |
| Dev Tunnels support | Not applicable | Built-in for iOS/Android |
| Production deployment with Aspire | Not supported | Not supported |
For cross-platform desktop and mobile scenarios, consider [.NET MAUI integration](/integrations/dotnet/maui/).
## See also
[Section titled “See also”](#see-also)
* [.NET MAUI integration](/integrations/dotnet/maui/)
* [AppHost overview](/get-started/app-host/)
* [Service discovery in .NET](/fundamentals/networking-overview/)
* [WPF documentation](https://learn.microsoft.com/dotnet/desktop/wpf/)
* [Windows Forms documentation](https://learn.microsoft.com/dotnet/desktop/winforms/)
# Integrations gallery
> Explore the Aspire gallery of integrations and extensions to enhance your Aspire solution.
Search integrations...Clear
OfficialCommunity
0
Number of Integrations
0
Unique Tags
0
Total Downloads
[Aspire.Hosting.PostgreSQL](/integrations/databases/postgres/postgres-get-started/ "Aspire.Hosting.PostgreSQL")
PostgreSQL® support for Aspire.
hostingpostgresqlpostgres+5
```bash
aspire add postgresql
```
[](/integrations/databases/postgres/postgres-host/?aspire-lang=typescript "View Aspire.Hosting.PostgreSQL documentation in TypeScript")[](/integrations/databases/postgres/postgres-host/?aspire-lang=csharp "View Aspire.Hosting.PostgreSQL documentation in C#")
7.9M
Version 13.5.3
[PackageVisit Aspire.Hosting.PostgreSQL package](https://www.nuget.org/packages/Aspire.Hosting.PostgreSQL)
[Aspire.Hosting.SqlServer](/integrations/databases/sql-server/sql-server-get-started/ "Aspire.Hosting.SqlServer")
Microsoft SQL Server support for Aspire.
hostingsqlserversql+3
```bash
aspire add sqlserver
```
[](/integrations/databases/sql-server/sql-server-host/?aspire-lang=typescript "View Aspire.Hosting.SqlServer documentation in TypeScript")[](/integrations/databases/sql-server/sql-server-host/?aspire-lang=csharp "View Aspire.Hosting.SqlServer documentation in C#")
7.7M
Version 13.5.3
[PackageVisit Aspire.Hosting.SqlServer package](https://www.nuget.org/packages/Aspire.Hosting.SqlServer)
[Aspire.Hosting.Redis](/integrations/caching/redis/redis-get-started/ "Aspire.Hosting.Redis")
Redis® support for Aspire.
hostingrediscache+2
```bash
aspire add redis
```
[](/integrations/caching/redis/redis-host/?aspire-lang=typescript "View Aspire.Hosting.Redis documentation in TypeScript")[](/integrations/caching/redis/redis-host/?aspire-lang=csharp "View Aspire.Hosting.Redis documentation in C#")
7.7M
Version 13.5.3
[PackageVisit Aspire.Hosting.Redis package](https://www.nuget.org/packages/Aspire.Hosting.Redis)
[Aspire.Hosting.Azure.Storage](/integrations/cloud/azure/azure-storage-blobs/azure-storage-blobs-get-started/ "Aspire.Hosting.Azure.Storage")
Azure Storage resource types for Aspire.
hostingazurestorage+5
```bash
aspire add azure-storage
```
[](/integrations/cloud/azure/azure-storage-blobs/azure-storage-blobs-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.Storage documentation in TypeScript")[](/integrations/cloud/azure/azure-storage-blobs/azure-storage-blobs-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.Storage documentation in C#")
6.4M
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.Storage package](https://www.nuget.org/packages/Aspire.Hosting.Azure.Storage)
[Aspire.Hosting.JavaScript](/integrations/frameworks/javascript/ "Aspire.Hosting.JavaScript")
JavaScript support for Aspire.
hostingnodenodejs+4
```bash
aspire add javascript
```
[](/integrations/frameworks/javascript/?aspire-lang=typescript "View Aspire.Hosting.JavaScript documentation in TypeScript")[](/integrations/frameworks/javascript/?aspire-lang=csharp "View Aspire.Hosting.JavaScript documentation in C#")
3.9M
Version 13.5.3
[PackageVisit Aspire.Hosting.JavaScript package](https://www.nuget.org/packages/Aspire.Hosting.JavaScript)
[Aspire.Hosting.Azure.KeyVault](/integrations/cloud/azure/azure-key-vault/azure-key-vault-get-started/ "Aspire.Hosting.Azure.KeyVault")
Azure resource types for Aspire.
hostingazurekeyvault+4
```bash
aspire add azure-keyvault
```
[](/integrations/cloud/azure/azure-key-vault/azure-key-vault-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.KeyVault documentation in TypeScript")[](/integrations/cloud/azure/azure-key-vault/azure-key-vault-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.KeyVault documentation in C#")
3.4M
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.KeyVault package](https://www.nuget.org/packages/Aspire.Hosting.Azure.KeyVault)
[Aspire.Hosting.RabbitMQ](/integrations/messaging/rabbitmq/rabbitmq-get-started/ "Aspire.Hosting.RabbitMQ")
RabbitMQ support for Aspire.
hostingrabbitmqmessaging+2
```bash
aspire add rabbitmq
```
[](/integrations/messaging/rabbitmq/rabbitmq-host/?aspire-lang=typescript "View Aspire.Hosting.RabbitMQ documentation in TypeScript")[](/integrations/messaging/rabbitmq/rabbitmq-host/?aspire-lang=csharp "View Aspire.Hosting.RabbitMQ documentation in C#")
3.2M
Version 13.5.3
[PackageVisit Aspire.Hosting.RabbitMQ package](https://www.nuget.org/packages/Aspire.Hosting.RabbitMQ)
[Aspire.Hosting.Azure.ServiceBus](/integrations/cloud/azure/azure-service-bus/azure-service-bus-get-started/ "Aspire.Hosting.Azure.ServiceBus")
Azure Service Bus resource types for Aspire.
hostingazureservicebus+4
```bash
aspire add azure-servicebus
```
[](/integrations/cloud/azure/azure-service-bus/azure-service-bus-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.ServiceBus documentation in TypeScript")[](/integrations/cloud/azure/azure-service-bus/azure-service-bus-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.ServiceBus documentation in C#")
2.5M
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.ServiceBus package](https://www.nuget.org/packages/Aspire.Hosting.Azure.ServiceBus)
[Aspire.Hosting.Azure.Functions](/integrations/cloud/azure/azure-functions/azure-functions-get-started/ "Aspire.Hosting.Azure.Functions")
Azure Functions resource types for Aspire.
hostingazurefunctions+3
```bash
aspire add azure-functions
```
[](/integrations/cloud/azure/azure-functions/azure-functions-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.Functions documentation in TypeScript")[](/integrations/cloud/azure/azure-functions/azure-functions-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.Functions documentation in C#")
1.8M
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.Functions package](https://www.nuget.org/packages/Aspire.Hosting.Azure.Functions)
[Aspire.Hosting.Azure.OperationalInsights](/integrations/cloud/azure/azure-log-analytics/ "Aspire.Hosting.Azure.OperationalInsights")
Azure Log Analytics resource types for Aspire.
hostingazuremonitoring+3
```bash
aspire add azure-operationalinsights
```
[](/integrations/cloud/azure/azure-log-analytics/?aspire-lang=typescript "View Aspire.Hosting.Azure.OperationalInsights documentation in TypeScript")[](/integrations/cloud/azure/azure-log-analytics/?aspire-lang=csharp "View Aspire.Hosting.Azure.OperationalInsights documentation in C#")
1.6M
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.OperationalInsights package](https://www.nuget.org/packages/Aspire.Hosting.Azure.OperationalInsights)
[Aspire.Hosting.Azure.CosmosDB](/integrations/cloud/azure/azure-cosmos-db/azure-cosmos-db-get-started/ "Aspire.Hosting.Azure.CosmosDB")
Azure Cosmos DB resource types for Aspire.
hostingazurecosmosdb+5
```bash
aspire add azure-cosmosdb
```
[](/integrations/cloud/azure/azure-cosmos-db/azure-cosmos-db-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.CosmosDB documentation in TypeScript")[](/integrations/cloud/azure/azure-cosmos-db/azure-cosmos-db-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.CosmosDB documentation in C#")
1.6M
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.CosmosDB package](https://www.nuget.org/packages/Aspire.Hosting.Azure.CosmosDB)
[Aspire.Hosting.Kafka](/integrations/messaging/apache-kafka/apache-kafka-get-started/ "Aspire.Hosting.Kafka")
Kafka support for Aspire.
hostingkafkamessaging+2
```bash
aspire add kafka
```
[](/integrations/messaging/apache-kafka/apache-kafka-host/?aspire-lang=typescript "View Aspire.Hosting.Kafka documentation in TypeScript")[](/integrations/messaging/apache-kafka/apache-kafka-host/?aspire-lang=csharp "View Aspire.Hosting.Kafka documentation in C#")
1.3M
Version 13.5.3
[PackageVisit Aspire.Hosting.Kafka package](https://www.nuget.org/packages/Aspire.Hosting.Kafka)
[Aspire.Hosting.Azure.AppContainers](/integrations/cloud/azure/configure-container-apps/ "Aspire.Hosting.Azure.AppContainers")
Azure container apps resource types for Aspire.
hostingazurecontainer+3
```bash
aspire add azure-appcontainers
```
[](/integrations/cloud/azure/configure-container-apps/?aspire-lang=typescript "View Aspire.Hosting.Azure.AppContainers documentation in TypeScript")[](/integrations/cloud/azure/configure-container-apps/?aspire-lang=csharp "View Aspire.Hosting.Azure.AppContainers documentation in C#")
1.3M
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.AppContainers package](https://www.nuget.org/packages/Aspire.Hosting.Azure.AppContainers)
[Aspire.Hosting.MongoDB](/integrations/databases/mongodb/mongodb-get-started/ "Aspire.Hosting.MongoDB")
MongoDB support for Aspire.
hostingmongodbdatabase+2
```bash
aspire add mongodb
```
[](/integrations/databases/mongodb/mongodb-host/?aspire-lang=typescript "View Aspire.Hosting.MongoDB documentation in TypeScript")[](/integrations/databases/mongodb/mongodb-host/?aspire-lang=csharp "View Aspire.Hosting.MongoDB documentation in C#")
1M
Version 13.5.3
[PackageVisit Aspire.Hosting.MongoDB package](https://www.nuget.org/packages/Aspire.Hosting.MongoDB)
[Aspire.Hosting.Azure.ApplicationInsights](/integrations/cloud/azure/azure-application-insights/ "Aspire.Hosting.Azure.ApplicationInsights")
Azure Application Insights resource types for Aspire.
hostingazuremonitoring+4
```bash
aspire add azure-applicationinsights
```
[](/integrations/cloud/azure/azure-application-insights/?aspire-lang=typescript "View Aspire.Hosting.Azure.ApplicationInsights documentation in TypeScript")[](/integrations/cloud/azure/azure-application-insights/?aspire-lang=csharp "View Aspire.Hosting.Azure.ApplicationInsights documentation in C#")
980k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.ApplicationInsights package](https://www.nuget.org/packages/Aspire.Hosting.Azure.ApplicationInsights)
[Aspire.Hosting.Azure.Sql](/integrations/cloud/azure/azure-sql-database/azure-sql-database-get-started/ "Aspire.Hosting.Azure.Sql")
Azure SQL Database resource types for Aspire.
hostingazuresql+4
```bash
aspire add azure-sql
```
[](/integrations/cloud/azure/azure-sql-database/azure-sql-database-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.Sql documentation in TypeScript")[](/integrations/cloud/azure/azure-sql-database/azure-sql-database-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.Sql documentation in C#")
957k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.Sql package](https://www.nuget.org/packages/Aspire.Hosting.Azure.Sql)
[Aspire.Hosting.Azure.ContainerRegistry](/integrations/cloud/azure/azure-container-registry/azure-container-registry-get-started/ "Aspire.Hosting.Azure.ContainerRegistry")
Azure Container Registry resource types for Aspire.
hostingazurecontainer+3
```bash
aspire add azure-containerregistry
```
[](/integrations/cloud/azure/azure-container-registry/azure-container-registry-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.ContainerRegistry documentation in TypeScript")[](/integrations/cloud/azure/azure-container-registry/azure-container-registry-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.ContainerRegistry documentation in C#")
947k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.ContainerRegistry package](https://www.nuget.org/packages/Aspire.Hosting.Azure.ContainerRegistry)
[Aspire.Hosting.Keycloak](/integrations/security/keycloak/ "Aspire.Hosting.Keycloak")
Keycloak support for Aspire.
hostingkeycloakauthentication+3
```bash
aspire add keycloak
```
[](/integrations/security/keycloak/?aspire-lang=typescript "View Aspire.Hosting.Keycloak documentation in TypeScript")[](/integrations/security/keycloak/?aspire-lang=csharp "View Aspire.Hosting.Keycloak documentation in C#")
888k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Keycloak package](https://www.nuget.org/packages/Aspire.Hosting.Keycloak)
[Aspire.Hosting.Azure.CognitiveServices](/integrations/cloud/azure/azure-openai/azure-openai-get-started/ "Aspire.Hosting.Azure.CognitiveServices")
Azure OpenAI resource types for Aspire.
hostingazureopenai+6
```bash
aspire add azure-cognitiveservices
```
[](/integrations/cloud/azure/azure-openai/azure-openai-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.CognitiveServices documentation in TypeScript")[](/integrations/cloud/azure/azure-openai/azure-openai-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.CognitiveServices documentation in C#")
839k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.CognitiveServices package](https://www.nuget.org/packages/Aspire.Hosting.Azure.CognitiveServices)
[Aspire.Hosting.Azure.PostgreSQL](/integrations/cloud/azure/azure-postgresql/azure-postgresql-get-started/ "Aspire.Hosting.Azure.PostgreSQL")
Azure PostgreSql Flexible Server resource types for Aspire.
hostingazurepostgresql+4
```bash
aspire add azure-postgresql
```
[](/integrations/cloud/azure/azure-postgresql/azure-postgresql-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.PostgreSQL documentation in TypeScript")[](/integrations/cloud/azure/azure-postgresql/azure-postgresql-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.PostgreSQL documentation in C#")
819k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.PostgreSQL package](https://www.nuget.org/packages/Aspire.Hosting.Azure.PostgreSQL)
[Aspire.Hosting.AWS](https://docs.aws.amazon.com/sdk-for-net/v4/developer-guide/aspire-integrations.html "Aspire.Hosting.AWS")
Add support for provisioning AWS application resources and configuring the AWS SDK for .NET.
hostingaws
```bash
aspire add aws
```
[View documentation](https://docs.aws.amazon.com/sdk-for-net/v4/developer-guide/aspire-integrations.html "View Aspire.Hosting.AWS documentation")
793k
Version 13.7.2
[PackageVisit Aspire.Hosting.AWS package](https://www.nuget.org/packages/Aspire.Hosting.AWS)
[CommunityToolkit.Aspire.Hosting.Dapr](/integrations/frameworks/dapr/dapr-get-started/ "CommunityToolkit.Aspire.Hosting.Dapr")
Dapr support for Aspire.
communitytoolkithostingdaprpolyglot
```bash
aspire add communitytoolkit-dapr
```
[](/integrations/frameworks/dapr/dapr-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Dapr documentation in TypeScript")[](/integrations/frameworks/dapr/dapr-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Dapr documentation in C#")
725k
Version 13.0.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Dapr package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Dapr)
[Aspire.Hosting.Valkey](/integrations/caching/valkey/valkey-get-started/ "Aspire.Hosting.Valkey")
Valkey® support for Aspire.
hostingvalkeycache+2
```bash
aspire add valkey
```
[](/integrations/caching/valkey/valkey-host/?aspire-lang=typescript "View Aspire.Hosting.Valkey documentation in TypeScript")[](/integrations/caching/valkey/valkey-host/?aspire-lang=csharp "View Aspire.Hosting.Valkey documentation in C#")
708k
Version 13.5.3
[PackageVisit Aspire.Hosting.Valkey package](https://www.nuget.org/packages/Aspire.Hosting.Valkey)
[Aspire.Hosting.Docker](/integrations/compute/docker/ "Aspire.Hosting.Docker")
Docker Compose publishing for Aspire.
hostingdockerdocker-composepolyglot
```bash
aspire add docker
```
[](/integrations/compute/docker/?aspire-lang=typescript "View Aspire.Hosting.Docker documentation in TypeScript")[](/integrations/compute/docker/?aspire-lang=csharp "View Aspire.Hosting.Docker documentation in C#")
703k
Version 13.5.3
[PackageVisit Aspire.Hosting.Docker package](https://www.nuget.org/packages/Aspire.Hosting.Docker)
[Aspire.Hosting.Azure.EventHubs](/integrations/cloud/azure/azure-event-hubs/azure-event-hubs-get-started/ "Aspire.Hosting.Azure.EventHubs")
Azure Event Hubs resource types for Aspire.
hostingazureeventhubs+4
```bash
aspire add azure-eventhubs
```
[](/integrations/cloud/azure/azure-event-hubs/azure-event-hubs-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.EventHubs documentation in TypeScript")[](/integrations/cloud/azure/azure-event-hubs/azure-event-hubs-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.EventHubs documentation in C#")
649k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.EventHubs package](https://www.nuget.org/packages/Aspire.Hosting.Azure.EventHubs)
[Aspire.Hosting.Azure.Redis](/integrations/cloud/azure/azure-cache-redis/azure-cache-redis-get-started/ "Aspire.Hosting.Azure.Redis")
Azure Redis resource types for Aspire.
hostingazureredis+4
```bash
aspire add azure-redis
```
[](/integrations/cloud/azure/azure-cache-redis/azure-cache-redis-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.Redis documentation in TypeScript")[](/integrations/cloud/azure/azure-cache-redis/azure-cache-redis-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.Redis documentation in C#")
632k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.Redis package](https://www.nuget.org/packages/Aspire.Hosting.Azure.Redis)
[Aspire.Hosting.Azure.AppConfiguration](/integrations/cloud/azure/azure-app-configuration/azure-app-configuration-get-started/ "Aspire.Hosting.Azure.AppConfiguration")
Azure AppConfiguration resource types for Aspire.
hostingazureconfiguration+2
```bash
aspire add azure-appconfiguration
```
[](/integrations/cloud/azure/azure-app-configuration/azure-app-configuration-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.AppConfiguration documentation in TypeScript")[](/integrations/cloud/azure/azure-app-configuration/azure-app-configuration-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.AppConfiguration documentation in C#")
602k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.AppConfiguration package](https://www.nuget.org/packages/Aspire.Hosting.Azure.AppConfiguration)
[Aspire.Hosting.Seq](/integrations/observability/seq/seq-get-started/ "Aspire.Hosting.Seq")
Seq support for Aspire.
hostingseqobservability+2
```bash
aspire add seq
```
[](/integrations/observability/seq/seq-host/?aspire-lang=typescript "View Aspire.Hosting.Seq documentation in TypeScript")[](/integrations/observability/seq/seq-host/?aspire-lang=csharp "View Aspire.Hosting.Seq documentation in C#")
553k
Version 13.5.3
[PackageVisit Aspire.Hosting.Seq package](https://www.nuget.org/packages/Aspire.Hosting.Seq)
[Aspire.Hosting.DevTunnels](/integrations/devtools/dev-tunnels/ "Aspire.Hosting.DevTunnels")
DevTunnels support for Aspire.
hostingdevtunnelspolyglot
```bash
aspire add devtunnels
```
[](/integrations/devtools/dev-tunnels/?aspire-lang=typescript "View Aspire.Hosting.DevTunnels documentation in TypeScript")[](/integrations/devtools/dev-tunnels/?aspire-lang=csharp "View Aspire.Hosting.DevTunnels documentation in C#")
535k
Version 13.5.3
[PackageVisit Aspire.Hosting.DevTunnels package](https://www.nuget.org/packages/Aspire.Hosting.DevTunnels)
[Aspire.Hosting.Yarp](/integrations/reverse-proxies/yarp/ "Aspire.Hosting.Yarp")
YARP support for Aspire.
hostingyarpreverse-proxy+2
```bash
aspire add yarp
```
[](/integrations/reverse-proxies/yarp/?aspire-lang=typescript "View Aspire.Hosting.Yarp documentation in TypeScript")[](/integrations/reverse-proxies/yarp/?aspire-lang=csharp "View Aspire.Hosting.Yarp documentation in C#")
522k
Version 13.5.3
[PackageVisit Aspire.Hosting.Yarp package](https://www.nuget.org/packages/Aspire.Hosting.Yarp)
[Aspire.Hosting.Elasticsearch](/integrations/databases/elasticsearch/elasticsearch-get-started/ "Aspire.Hosting.Elasticsearch")
Elasticsearch support for Aspire.
hostingelasticsearch
```bash
aspire add elasticsearch
```
[](/integrations/databases/elasticsearch/elasticsearch-host/?aspire-lang=typescript "View Aspire.Hosting.Elasticsearch documentation in TypeScript")[](/integrations/databases/elasticsearch/elasticsearch-host/?aspire-lang=csharp "View Aspire.Hosting.Elasticsearch documentation in C#")
433k
Version 13.3.0
[PackageVisit Aspire.Hosting.Elasticsearch package](https://www.nuget.org/packages/Aspire.Hosting.Elasticsearch)
[Aspire.Hosting.Azure.Network](/integrations/cloud/azure/azure-virtual-network/ "Aspire.Hosting.Azure.Network")
Azure Virtual Network resource types for Aspire.
hostingazurenetwork+7
```bash
aspire add azure-network
```
[](/integrations/cloud/azure/azure-virtual-network/?aspire-lang=typescript "View Aspire.Hosting.Azure.Network documentation in TypeScript")[](/integrations/cloud/azure/azure-virtual-network/?aspire-lang=csharp "View Aspire.Hosting.Azure.Network documentation in C#")
432k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.Network package](https://www.nuget.org/packages/Aspire.Hosting.Azure.Network)
[Aspire.Hosting.MySql](/integrations/databases/mysql/mysql-get-started/ "Aspire.Hosting.MySql")
MySQL support for Aspire.
hostingmysqldatabase+2
```bash
aspire add mysql
```
[](/integrations/databases/mysql/mysql-host/?aspire-lang=typescript "View Aspire.Hosting.MySql documentation in TypeScript")[](/integrations/databases/mysql/mysql-host/?aspire-lang=csharp "View Aspire.Hosting.MySql documentation in C#")
388k
Version 13.5.3
[PackageVisit Aspire.Hosting.MySql package](https://www.nuget.org/packages/Aspire.Hosting.MySql)
[CommunityToolkit.Aspire.Hosting.Ollama](/integrations/ai/ollama/ollama-get-started/ "CommunityToolkit.Aspire.Hosting.Ollama")
An Aspire integration leveraging the Ollama container with support for downloading a model on startup.
communitytoolkithostingollama+2
```bash
aspire add communitytoolkit-ollama
```
[](/integrations/ai/ollama/ollama-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Ollama documentation in TypeScript")[](/integrations/ai/ollama/ollama-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Ollama documentation in C#")
388k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Ollama package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Ollama)
[Aspire.Hosting.Python](/integrations/frameworks/python/ "Aspire.Hosting.Python")
Python support for Aspire.
hostingpythonframework+2
```bash
aspire add python
```
[](/integrations/frameworks/python/?aspire-lang=typescript "View Aspire.Hosting.Python documentation in TypeScript")[](/integrations/frameworks/python/?aspire-lang=csharp "View Aspire.Hosting.Python documentation in C#")
378k
Version 13.5.3
[PackageVisit Aspire.Hosting.Python package](https://www.nuget.org/packages/Aspire.Hosting.Python)
[Aspire.Hosting.Orleans](/integrations/frameworks/orleans/ "Aspire.Hosting.Orleans")
Orleans support for Aspire.
hostingorleansmessaging+2
```bash
aspire add orleans
```
[](/integrations/frameworks/orleans/?aspire-lang=typescript "View Aspire.Hosting.Orleans documentation in TypeScript")[](/integrations/frameworks/orleans/?aspire-lang=csharp "View Aspire.Hosting.Orleans documentation in C#")
367k
Version 13.5.3
[PackageVisit Aspire.Hosting.Orleans package](https://www.nuget.org/packages/Aspire.Hosting.Orleans)
[CommunityToolkit.Aspire.Hosting.MailPit](/integrations/devtools/mailpit/mailpit-get-started/ "CommunityToolkit.Aspire.Hosting.MailPit")
An Aspire component leveraging the MailPit container.
communitytoolkitmailpitsmtp+2
```bash
aspire add communitytoolkit-mailpit
```
[](/integrations/devtools/mailpit/mailpit-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.MailPit documentation in TypeScript")[](/integrations/devtools/mailpit/mailpit-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.MailPit documentation in C#")
366k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.MailPit package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.MailPit)
[CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects](/integrations/devtools/sql-projects/sql-projects-get-started/ "CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects")
An Aspire hosting integration capable of deploying SQL Server Database Projects as part of your AppHost.
communitytoolkithostingsql+2
```bash
aspire add communitytoolkit-sqldatabaseprojects
```
[](/integrations/devtools/sql-projects/sql-projects-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects documentation in TypeScript")[](/integrations/devtools/sql-projects/sql-projects-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects documentation in C#")
345k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects)
[Aspire.Hosting.Azure.SignalR](/integrations/cloud/azure/azure-signalr/azure-signalr-get-started/ "Aspire.Hosting.Azure.SignalR")
Azure SignalR resource types for Aspire.
hostingazuresignalr+3
```bash
aspire add azure-signalr
```
[](/integrations/cloud/azure/azure-signalr/azure-signalr-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.SignalR documentation in TypeScript")[](/integrations/cloud/azure/azure-signalr/azure-signalr-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.SignalR documentation in C#")
334k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.SignalR package](https://www.nuget.org/packages/Aspire.Hosting.Azure.SignalR)
CommunityToolkit.Aspire.Hosting.DbGate
An Aspire hosting integration for the DbGate database management container.
communitytoolkithostingdbgatepolyglot
```bash
aspire add communitytoolkit-dbgate
```
324k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.DbGate package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.DbGate)
[Aspire.Hosting.Azure.Search](/integrations/cloud/azure/azure-ai-search/azure-ai-search-get-started/ "Aspire.Hosting.Azure.Search")
Azure AI Search resource types for Aspire.
hostingazuresearch+4
```bash
aspire add azure-search
```
[](/integrations/cloud/azure/azure-ai-search/azure-ai-search-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.Search documentation in TypeScript")[](/integrations/cloud/azure/azure-ai-search/azure-ai-search-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.Search documentation in C#")
311k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.Search package](https://www.nuget.org/packages/Aspire.Hosting.Azure.Search)
CommunityToolkit.Aspire.Hosting.Adminer
An Aspire hosting integration for the Adminer database management container.
communitytoolkithostingadminerpolyglot
```bash
aspire add communitytoolkit-adminer
```
267k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Adminer package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Adminer)
[Aspire.Hosting.Kubernetes](/integrations/compute/kubernetes/ "Aspire.Hosting.Kubernetes")
Kubernetes publishing for Aspire.
hostingkubernetespolyglot
```bash
aspire add kubernetes
```
[](/integrations/compute/kubernetes/?aspire-lang=typescript "View Aspire.Hosting.Kubernetes documentation in TypeScript")[](/integrations/compute/kubernetes/?aspire-lang=csharp "View Aspire.Hosting.Kubernetes documentation in C#")
245k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Kubernetes package](https://www.nuget.org/packages/Aspire.Hosting.Kubernetes)
[Aspire.Hosting.Nats](/integrations/messaging/nats/nats-get-started/ "Aspire.Hosting.Nats")
NATS support for Aspire.
hostingnatsmessaging+2
```bash
aspire add nats
```
[](/integrations/messaging/nats/nats-host/?aspire-lang=typescript "View Aspire.Hosting.Nats documentation in TypeScript")[](/integrations/messaging/nats/nats-host/?aspire-lang=csharp "View Aspire.Hosting.Nats documentation in C#")
238k
Version 13.5.3
[PackageVisit Aspire.Hosting.Nats package](https://www.nuget.org/packages/Aspire.Hosting.Nats)
[CommunityToolkit.Aspire.Hosting.SqlServer.Extensions](/integrations/databases/sql-server/sql-server-extensions/ "CommunityToolkit.Aspire.Hosting.SqlServer.Extensions")
An Aspire hosting integration for extending SQL Server resources with additional management tooling.
communitytoolkithostingsqlserver+2
```bash
aspire add communitytoolkit-sqlserver-extensions
```
[](/integrations/databases/sql-server/sql-server-extensions/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.SqlServer.Extensions documentation in TypeScript")[](/integrations/databases/sql-server/sql-server-extensions/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.SqlServer.Extensions documentation in C#")
217k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.SqlServer.Extensions package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.SqlServer.Extensions)
CommunityToolkit.Aspire.Hosting.Ngrok
An Aspire integration for exposing hosted applications via secure, public URLs using ngrok.
communitytoolkithostingngrok+2
```bash
aspire add communitytoolkit-ngrok
```
196k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Ngrok package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Ngrok)
CommunityToolkit.Aspire.Hosting.Minio
An Aspire hosting integration for MinIO. DEPRECATED: The MinIO OSS project has been archived and is no longer maintained. This integration is deprecated and will be removed in a future version.
communitytoolkitminiohosting+4
```bash
aspire add communitytoolkit-minio
```
184k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Minio package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Minio)
[CommunityToolkit.Aspire.Hosting.JavaScript.Extensions](/integrations/frameworks/nodejs-extensions/ "CommunityToolkit.Aspire.Hosting.JavaScript.Extensions")
An Aspire integration for hosting NodeJS apps using Vite, Yarn, PNPM, or NPM.
communitytoolkithostingnodejs+5
```bash
aspire add communitytoolkit-javascript-extensions
```
[](/integrations/frameworks/nodejs-extensions/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.JavaScript.Extensions documentation in TypeScript")[](/integrations/frameworks/nodejs-extensions/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.JavaScript.Extensions documentation in C#")
168k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.JavaScript.Extensions package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.JavaScript.Extensions)
Aspire.Hosting.Browsers
Browser support for Aspire hosting.
hostingbrowserbrowsers+3
```bash
aspire add browsers
```
162k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Browsers package](https://www.nuget.org/packages/Aspire.Hosting.Browsers)
[Aspire.Hosting.Qdrant](/integrations/databases/qdrant/qdrant-get-started/ "Aspire.Hosting.Qdrant")
Qdrant vector database support for Aspire.
hostingqdrantvector+4
```bash
aspire add qdrant
```
[](/integrations/databases/qdrant/qdrant-host/?aspire-lang=typescript "View Aspire.Hosting.Qdrant documentation in TypeScript")[](/integrations/databases/qdrant/qdrant-host/?aspire-lang=csharp "View Aspire.Hosting.Qdrant documentation in C#")
150k
Version 13.5.3
[PackageVisit Aspire.Hosting.Qdrant package](https://www.nuget.org/packages/Aspire.Hosting.Qdrant)
[Aspire.Hosting.Garnet](/integrations/caching/garnet/garnet-get-started/ "Aspire.Hosting.Garnet")
Garnet® support for Aspire.
hostinggarnetcache+2
```bash
aspire add garnet
```
[](/integrations/caching/garnet/garnet-host/?aspire-lang=typescript "View Aspire.Hosting.Garnet documentation in TypeScript")[](/integrations/caching/garnet/garnet-host/?aspire-lang=csharp "View Aspire.Hosting.Garnet documentation in C#")
114k
Version 13.5.3
[PackageVisit Aspire.Hosting.Garnet package](https://www.nuget.org/packages/Aspire.Hosting.Garnet)
[CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions](/integrations/databases/postgres/postgresql-extensions/ "CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions")
An Aspire hosting integration for extending PostgreSQL resources with additional management tooling.
communitytoolkithostingpostgres+2
```bash
aspire add communitytoolkit-postgresql-extensions
```
[](/integrations/databases/postgres/postgresql-extensions/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions documentation in TypeScript")[](/integrations/databases/postgres/postgresql-extensions/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions documentation in C#")
109k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.PostgreSQL.Extensions)
[Aspire.Hosting.Oracle](/integrations/databases/efcore/oracle/oracle-get-started/ "Aspire.Hosting.Oracle")
Oracle Database support for Aspire.
hostingoraclesql+3
```bash
aspire add oracle
```
[](/integrations/databases/efcore/oracle/oracle-host/?aspire-lang=typescript "View Aspire.Hosting.Oracle documentation in TypeScript")[](/integrations/databases/efcore/oracle/oracle-host/?aspire-lang=csharp "View Aspire.Hosting.Oracle documentation in C#")
97k
Version 13.5.3
[PackageVisit Aspire.Hosting.Oracle package](https://www.nuget.org/packages/Aspire.Hosting.Oracle)
[CommunityToolkit.Aspire.Hosting.Sqlite](/integrations/databases/sqlite/sqlite-get-started/ "CommunityToolkit.Aspire.Hosting.Sqlite")
An Aspire hosting integration for providing a Sqlite database connection.
communitytoolkithostingsql+2
```bash
aspire add communitytoolkit-sqlite
```
[](/integrations/databases/sqlite/sqlite-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Sqlite documentation in TypeScript")[](/integrations/databases/sqlite/sqlite-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Sqlite documentation in C#")
94k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Sqlite package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Sqlite)
[CommunityToolkit.Aspire.Hosting.Azure.Dapr](/integrations/frameworks/dapr/dapr-get-started/ "CommunityToolkit.Aspire.Hosting.Azure.Dapr")
Azure Dapr support for Aspire.
communitytoolkithostingdapr+2
```bash
aspire add communitytoolkit-azure-dapr
```
[](/integrations/frameworks/dapr/dapr-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Azure.Dapr documentation in TypeScript")[](/integrations/frameworks/dapr/dapr-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Azure.Dapr documentation in C#")
91k
Version 13.0.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Azure.Dapr package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Azure.Dapr)
[Aspire.Hosting.Azure.AppService](/integrations/cloud/azure/azure-app-service/azure-app-service-get-started/ "Aspire.Hosting.Azure.AppService")
Azure app service resource types for Aspire.
hostingazurecloud+2
```bash
aspire add azure-appservice
```
[](/integrations/cloud/azure/azure-app-service/azure-app-service-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.AppService documentation in TypeScript")[](/integrations/cloud/azure/azure-app-service/azure-app-service-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.AppService documentation in C#")
91k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.AppService package](https://www.nuget.org/packages/Aspire.Hosting.Azure.AppService)
[CommunityToolkit.Aspire.Hosting.MongoDB.Extensions](/integrations/databases/mongodb/mongodb-extensions/ "CommunityToolkit.Aspire.Hosting.MongoDB.Extensions")
An Aspire hosting integration for extending MongoDB resources with additional management tooling.
communitytoolkithostingmongodb+2
```bash
aspire add communitytoolkit-mongodb-extensions
```
[](/integrations/databases/mongodb/mongodb-extensions/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.MongoDB.Extensions documentation in TypeScript")[](/integrations/databases/mongodb/mongodb-extensions/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.MongoDB.Extensions documentation in C#")
86k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.MongoDB.Extensions package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.MongoDB.Extensions)
[CommunityToolkit.Aspire.Hosting.Redis.Extensions](/integrations/caching/redis-extensions/ "CommunityToolkit.Aspire.Hosting.Redis.Extensions")
An Aspire hosting integration for extending Redis resources with additional management tooling.
communitytoolkithostingredis+2
```bash
aspire add communitytoolkit-redis-extensions
```
[](/integrations/caching/redis-extensions/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Redis.Extensions documentation in TypeScript")[](/integrations/caching/redis-extensions/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Redis.Extensions documentation in C#")
78k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Redis.Extensions package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Redis.Extensions)
[CommunityToolkit.Aspire.Hosting.Java](/integrations/frameworks/java/java-get-started/ "CommunityToolkit.Aspire.Hosting.Java")
An Aspire integration for hosting Java apps using either the Java executable or container image.
communitytoolkithostingjavapolyglot
```bash
aspire add communitytoolkit-java
```
[](/integrations/frameworks/java/java-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Java documentation in TypeScript")[](/integrations/frameworks/java/java-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Java documentation in C#")
78k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Java package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Java)
[CommunityToolkit.Aspire.Hosting.Python.Extensions](/integrations/frameworks/python/ "CommunityToolkit.Aspire.Hosting.Python.Extensions")
An Aspire integration for hosting Uvicorn apps.
communitytoolkithostinguvicorn+2
```bash
aspire add communitytoolkit-python-extensions
```
[](/integrations/frameworks/python/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Python.Extensions documentation in TypeScript")[](/integrations/frameworks/python/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Python.Extensions documentation in C#")
78k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Python.Extensions package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Python.Extensions)
Aspire.TypeSystem
Aspire Type System (ATS) APIs for Aspire polyglot support.
atstypesystempolyglot
```bash
aspire add aspire-typesystem
```
78k
Version 13.5.3
[PackageVisit Aspire.TypeSystem package](https://www.nuget.org/packages/Aspire.TypeSystem)
CommunityToolkit.Aspire.Hosting.ActiveMQ
An Aspire hosting package for hosting ActiveMQ.
communitytoolkithostingactivemqpolyglot
```bash
aspire add communitytoolkit-activemq
```
74k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.ActiveMQ package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.ActiveMQ)
[CommunityToolkit.Aspire.Hosting.Meilisearch](/integrations/databases/meilisearch/meilisearch-get-started/ "CommunityToolkit.Aspire.Hosting.Meilisearch")
Meilisearch support for Aspire.
communitytoolkithostingmeilisearchpolyglot
```bash
aspire add communitytoolkit-meilisearch
```
[](/integrations/databases/meilisearch/meilisearch-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Meilisearch documentation in TypeScript")[](/integrations/databases/meilisearch/meilisearch-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Meilisearch documentation in C#")
73k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Meilisearch package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Meilisearch)
[CommunityToolkit.Aspire.Hosting.RavenDB](/integrations/databases/ravendb/ravendb-get-started/ "CommunityToolkit.Aspire.Hosting.RavenDB")
An Aspire integration leveraging the RavenDB container.
communitytoolkithostingravendbpolyglot
```bash
aspire add communitytoolkit-ravendb
```
[](/integrations/databases/ravendb/ravendb-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.RavenDB documentation in TypeScript")[](/integrations/databases/ravendb/ravendb-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.RavenDB documentation in C#")
71k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.RavenDB package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.RavenDB)
CommunityToolkit.Aspire.Hosting.McpInspector
An Aspire hosting integration to run the MCP Inspector against a Model Context Protocol (MCP) server.
communitytoolkitaimcp+3
```bash
aspire add communitytoolkit-mcpinspector
```
71k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.McpInspector package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.McpInspector)
[CommunityToolkit.Aspire.Hosting.Deno](/integrations/frameworks/deno/deno-get-started/ "CommunityToolkit.Aspire.Hosting.Deno")
An Aspire integration for hosting Deno apps.
communitytoolkithostingdenopolyglot
```bash
aspire add communitytoolkit-deno
```
[](/integrations/frameworks/deno/deno-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Deno documentation in TypeScript")[](/integrations/frameworks/deno/deno-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Deno documentation in C#")
71k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Deno package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Deno)
[CommunityToolkit.Aspire.Hosting.Rust](/integrations/frameworks/rust/rust-get-started/ "CommunityToolkit.Aspire.Hosting.Rust")
An Aspire integration for hosting Rust apps.
communitytoolkithostingrustpolyglot
```bash
aspire add communitytoolkit-rust
```
[](/integrations/frameworks/rust/rust-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Rust documentation in TypeScript")[](/integrations/frameworks/rust/rust-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Rust documentation in C#")
70k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Rust package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Rust)
[CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder](/integrations/devtools/dab/dab-get-started/ "CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder")
An Aspire component leveraging the Data API Builder container.
communitytoolkitapidataapibuilder+2
```bash
aspire add communitytoolkit-azure-dataapibuilder
```
[](/integrations/devtools/dab/dab-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder documentation in TypeScript")[](/integrations/devtools/dab/dab-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder documentation in C#")
69k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder)
Aspire.Hosting.CodeGeneration.TypeScript
Package Description
```bash
aspire add codegeneration-typescript
```
67k
Version 13.5.3
[PackageVisit Aspire.Hosting.CodeGeneration.TypeScript package](https://www.nuget.org/packages/Aspire.Hosting.CodeGeneration.TypeScript)
[CommunityToolkit.Aspire.Hosting.PowerShell](/integrations/frameworks/powershell/powershell-get-started/ "CommunityToolkit.Aspire.Hosting.PowerShell")
Run powershell scripts in-process with your Aspire AppHost, injecting aspire resources and/or object instances as variables, using the command lines tools of your choice like azure cli, azd, or any other terminal tools.
communitytoolkitpowershellpwsh+4
```bash
aspire add communitytoolkit-powershell
```
[](/integrations/frameworks/powershell/powershell-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.PowerShell documentation in TypeScript")[](/integrations/frameworks/powershell/powershell-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.PowerShell documentation in C#")
66k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.PowerShell package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.PowerShell)
[CommunityToolkit.Aspire.Hosting.k6](/integrations/devtools/k6/k6-get-started/ "CommunityToolkit.Aspire.Hosting.k6")
Grafana k6 support for Aspire.
communitytoolkithostingk6polyglot
```bash
aspire add communitytoolkit-k6
```
[](/integrations/devtools/k6/k6-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.k6 documentation in TypeScript")[](/integrations/devtools/k6/k6-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.k6 documentation in C#")
64k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.k6 package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.k6)
CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector
An Aspire hosting integration to add an OpenTelemetry Collector into the OTLP pipeline.
communitytoolkithostingopentelemetry+2
```bash
aspire add communitytoolkit-opentelemetrycollector
```
63k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.OpenTelemetryCollector)
CommunityToolkit.Aspire.Hosting.PapercutSmtp
An Aspire component leveraging Papercut SMTP container.
communitytoolkitpapercutsmtp+2
```bash
aspire add communitytoolkit-papercutsmtp
```
62k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.PapercutSmtp package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.PapercutSmtp)
[Aspire.Hosting.Foundry](/integrations/cloud/azure/azure-ai-foundry/azure-ai-foundry-get-started/ "Aspire.Hosting.Foundry")
Microsoft Foundry resource types for Aspire.
hostingazureopenai+6
```bash
aspire add foundry
```
[](/integrations/cloud/azure/azure-ai-foundry/azure-ai-foundry-host/?aspire-lang=typescript "View Aspire.Hosting.Foundry documentation in TypeScript")[](/integrations/cloud/azure/azure-ai-foundry/azure-ai-foundry-host/?aspire-lang=csharp "View Aspire.Hosting.Foundry documentation in C#")
57k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Foundry package](https://www.nuget.org/packages/Aspire.Hosting.Foundry)
[CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis](/integrations/frameworks/dapr/dapr-get-started/ "CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis")
An Aspire hosting integration for configuring Azure Cache for Redis as a Dapr state store or pub/sub component in your AppHost.
communitytoolkithostingazure+5
```bash
aspire add communitytoolkit-azure-dapr-redis
```
[](/integrations/frameworks/dapr/dapr-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis documentation in TypeScript")[](/integrations/frameworks/dapr/dapr-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis documentation in C#")
54k
Version 13.0.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis)
CommunityToolkit.Aspire.Hosting.Flyway
An Aspire integration for Flyway database migration tool.
communitytoolkithostingflyway+2
```bash
aspire add communitytoolkit-flyway
```
51k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Flyway package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Flyway)
[CommunityToolkit.Aspire.Hosting.LavinMQ](/integrations/messaging/lavinmq/lavinmq-get-started/ "CommunityToolkit.Aspire.Hosting.LavinMQ")
An Aspire hosting package for hosting LavinMQ.
communitytoolkithostinglavinmqpolyglot
```bash
aspire add communitytoolkit-lavinmq
```
[](/integrations/messaging/lavinmq/lavinmq-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.LavinMQ documentation in TypeScript")[](/integrations/messaging/lavinmq/lavinmq-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.LavinMQ documentation in C#")
49k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.LavinMQ package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.LavinMQ)
[CommunityToolkit.Aspire.Hosting.GoFeatureFlag](/integrations/devtools/goff/goff-get-started/ "CommunityToolkit.Aspire.Hosting.GoFeatureFlag")
GO Feature Flag support for Aspire.
communitytoolkithostinggofeatureflagpolyglot
```bash
aspire add communitytoolkit-gofeatureflag
```
[](/integrations/devtools/goff/goff-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.GoFeatureFlag documentation in TypeScript")[](/integrations/devtools/goff/goff-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.GoFeatureFlag documentation in C#")
48k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.GoFeatureFlag package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.GoFeatureFlag)
[CommunityToolkit.Aspire.Hosting.MySql.Extensions](/integrations/databases/mysql/mysql-extensions/ "CommunityToolkit.Aspire.Hosting.MySql.Extensions")
An Aspire hosting integration for extending MySQL resources with additional management tooling.
communitytoolkithostingmysql+2
```bash
aspire add communitytoolkit-mysql-extensions
```
[](/integrations/databases/mysql/mysql-extensions/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.MySql.Extensions documentation in TypeScript")[](/integrations/databases/mysql/mysql-extensions/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.MySql.Extensions documentation in C#")
46k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.MySql.Extensions package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.MySql.Extensions)
[Aspire.Hosting.OpenAI](/integrations/ai/openai/openai-get-started/ "Aspire.Hosting.OpenAI")
OpenAI resource types for Aspire.
hostingopenaiaipolyglot
```bash
aspire add openai
```
[](/integrations/ai/openai/openai-host/?aspire-lang=typescript "View Aspire.Hosting.OpenAI documentation in TypeScript")[](/integrations/ai/openai/openai-host/?aspire-lang=csharp "View Aspire.Hosting.OpenAI documentation in C#")
46k
Version 13.5.3
[PackageVisit Aspire.Hosting.OpenAI package](https://www.nuget.org/packages/Aspire.Hosting.OpenAI)
[Aspire.Hosting.Maui](/integrations/dotnet/maui/ "Aspire.Hosting.Maui")
MAUI integration for Aspire (local dev only)
mauihostingpolyglot
```bash
aspire add maui
```
[](/integrations/dotnet/maui/?aspire-lang=typescript "View Aspire.Hosting.Maui documentation in TypeScript")[](/integrations/dotnet/maui/?aspire-lang=csharp "View Aspire.Hosting.Maui documentation in C#")
41k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Maui package](https://www.nuget.org/packages/Aspire.Hosting.Maui)
[Aspire.Hosting.Azure.WebPubSub](/integrations/cloud/azure/azure-web-pubsub/azure-web-pubsub-get-started/ "Aspire.Hosting.Azure.WebPubSub")
Azure WebPubSub resource types for Aspire.
hostingazurewebpubsub+5
```bash
aspire add azure-webpubsub
```
[](/integrations/cloud/azure/azure-web-pubsub/azure-web-pubsub-host/?aspire-lang=typescript "View Aspire.Hosting.Azure.WebPubSub documentation in TypeScript")[](/integrations/cloud/azure/azure-web-pubsub/azure-web-pubsub-host/?aspire-lang=csharp "View Aspire.Hosting.Azure.WebPubSub documentation in C#")
39k
Version 13.5.3
[PackageVisit Aspire.Hosting.Azure.WebPubSub package](https://www.nuget.org/packages/Aspire.Hosting.Azure.WebPubSub)
Aspire.Hosting.EntityFrameworkCore
Entity Framework Core migration management support for Aspire.
hostingefefcore+4
```bash
aspire add entityframeworkcore
```
31k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.EntityFrameworkCore package](https://www.nuget.org/packages/Aspire.Hosting.EntityFrameworkCore)
[Aspire.Hosting.GitHub.Models](/integrations/ai/github-models/github-models-get-started/ "Aspire.Hosting.GitHub.Models")
GitHub Models resource types for Aspire.
hostinggithubmodels+2
```bash
aspire add github-models
```
[](/integrations/ai/github-models/github-models-host/?aspire-lang=typescript "View Aspire.Hosting.GitHub.Models documentation in TypeScript")[](/integrations/ai/github-models/github-models-host/?aspire-lang=csharp "View Aspire.Hosting.GitHub.Models documentation in C#")
31k
Version 13.5.3
[PackageVisit Aspire.Hosting.GitHub.Models package](https://www.nuget.org/packages/Aspire.Hosting.GitHub.Models)
Aspire.Hosting.ClickHouse
ClickHouse hosting support for Aspire. Adds ClickHouse container resources, databases, volumes, and health checks to the Aspire app model.
hostingclickhousedatabasedata
```bash
aspire add clickhouse
```
29k
Version 13.5.3
[PackageVisit Aspire.Hosting.ClickHouse package](https://www.nuget.org/packages/Aspire.Hosting.ClickHouse)
[CommunityToolkit.Aspire.Hosting.Flagd](/integrations/devtools/flagd/flagd-get-started/ "CommunityToolkit.Aspire.Hosting.Flagd")
flagd is a feature flag evaluation engine. Think of it as a ready-made, open source, OpenFeature-compliant feature flag backend system.
communitytoolkithostingflagd+3
```bash
aspire add communitytoolkit-flagd
```
[](/integrations/devtools/flagd/flagd-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Flagd documentation in TypeScript")[](/integrations/devtools/flagd/flagd-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Flagd documentation in C#")
26k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Flagd package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Flagd)
[CommunityToolkit.Aspire.Hosting.SurrealDb](/integrations/databases/surrealdb/surrealdb-get-started/ "CommunityToolkit.Aspire.Hosting.SurrealDb")
SurrealDB support for Aspire.
communitytoolkithostingsurrealdbpolyglot
```bash
aspire add communitytoolkit-surrealdb
```
[](/integrations/databases/surrealdb/surrealdb-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.SurrealDb documentation in TypeScript")[](/integrations/databases/surrealdb/surrealdb-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.SurrealDb documentation in C#")
22k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.SurrealDb package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.SurrealDb)
[CommunityToolkit.Aspire.Hosting.Keycloak.Extensions](/integrations/security/keycloak/ "CommunityToolkit.Aspire.Hosting.Keycloak.Extensions")
Aspire hosting extensions for Keycloak (includes PostgreSQL integration).
communitytoolkitkeycloakpostgres+3
```bash
aspire add communitytoolkit-keycloak-extensions
```
[](/integrations/security/keycloak/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Keycloak.Extensions documentation in TypeScript")[](/integrations/security/keycloak/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Keycloak.Extensions documentation in C#")
18k
Version 13.5.1-beta.748
[PackageVisit CommunityToolkit.Aspire.Hosting.Keycloak.Extensions package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Keycloak.Extensions)
[CommunityToolkit.Aspire.Hosting.KurrentDB](/integrations/databases/kurrentdb/kurrentdb-get-started/ "CommunityToolkit.Aspire.Hosting.KurrentDB")
KurrentDB support for Aspire.
communitytoolkithostingkurrentdbpolyglot
```bash
aspire add communitytoolkit-kurrentdb
```
[](/integrations/databases/kurrentdb/kurrentdb-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.KurrentDB documentation in TypeScript")[](/integrations/databases/kurrentdb/kurrentdb-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.KurrentDB documentation in C#")
17k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.KurrentDB package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.KurrentDB)
CommunityToolkit.Aspire.Hosting.Solr
An Aspire hosting integration for Apache Solr.
communitytoolkithostingsolr+2
```bash
aspire add communitytoolkit-solr
```
15k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Solr package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Solr)
[Aspire.Hosting.Milvus](/integrations/databases/milvus/milvus-get-started/ "Aspire.Hosting.Milvus")
Milvus vector database support for Aspire.
hostingmilvusdatabase+5
```bash
aspire add milvus
```
[](/integrations/databases/milvus/milvus-host/?aspire-lang=typescript "View Aspire.Hosting.Milvus documentation in TypeScript")[](/integrations/databases/milvus/milvus-host/?aspire-lang=csharp "View Aspire.Hosting.Milvus documentation in C#")
15k
Version 13.5.3
[PackageVisit Aspire.Hosting.Milvus package](https://www.nuget.org/packages/Aspire.Hosting.Milvus)
CommunityToolkit.Aspire.Hosting.Stripe
An Aspire integration for the Stripe CLI for local webhook forwarding and testing.
communitytoolkithostingstripe+3
```bash
aspire add communitytoolkit-stripe
```
13k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Stripe package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Stripe)
Aspire.Hosting.Azure.FrontDoor
Azure Front Door resource types for Aspire.
hostingazurefront-door+3
```bash
aspire add azure-frontdoor
```
10k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Azure.FrontDoor package](https://www.nuget.org/packages/Aspire.Hosting.Azure.FrontDoor)
Aspire.Hosting.CodeGeneration.Go
Package Description
```bash
aspire add codegeneration-go
```
10k
Version 13.5.3
[PackageVisit Aspire.Hosting.CodeGeneration.Go package](https://www.nuget.org/packages/Aspire.Hosting.CodeGeneration.Go)
CommunityToolkit.Aspire.Hosting.Dbx
An Aspire hosting integration for the Dbx database management container.
communitytoolkithostingdbxpolyglot
```bash
aspire add communitytoolkit-dbx
```
10k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Dbx package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Dbx)
CommunityToolkit.Aspire.Hosting.Sftp
Aspire hosting integration for the atmoz SFTP container image.
communitytoolkitatmozsftp+2
```bash
aspire add communitytoolkit-sftp
```
10k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Sftp package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Sftp)
[Aspire.Hosting.Azure.Kusto](/integrations/cloud/azure/azure-data-explorer/ "Aspire.Hosting.Azure.Kusto")
Azure Kusto support for Aspire.
hostingazurekusto+4
```bash
aspire add azure-kusto
```
[](/integrations/cloud/azure/azure-data-explorer/?aspire-lang=typescript "View Aspire.Hosting.Azure.Kusto documentation in TypeScript")[](/integrations/cloud/azure/azure-data-explorer/?aspire-lang=csharp "View Aspire.Hosting.Azure.Kusto documentation in C#")
10k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Azure.Kusto package](https://www.nuget.org/packages/Aspire.Hosting.Azure.Kusto)
CommunityToolkit.Aspire.Hosting.Elasticsearch.Extensions
An Aspire hosting integration for extending Elasticsearch resources with additional management tooling.
communitytoolkithostingelasticsearch+2
```bash
aspire add communitytoolkit-elasticsearch-extensions
```
7k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Elasticsearch.Extensions package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Elasticsearch.Extensions)
CommunityToolkit.Aspire.Hosting.Azure.Extensions
Azure extensions support for Aspire.
communitytoolkithostingazure+2
```bash
aspire add communitytoolkit-azure-extensions
```
6k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Azure.Extensions package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Azure.Extensions)
[Aspire.Hosting.Go](/integrations/frameworks/go/go-get-started/ "Aspire.Hosting.Go")
Go support for Aspire.
hostinggogolang+3
```bash
aspire add go
```
[](/integrations/frameworks/go/go-host/?aspire-lang=typescript "View Aspire.Hosting.Go documentation in TypeScript")[](/integrations/frameworks/go/go-host/?aspire-lang=csharp "View Aspire.Hosting.Go documentation in C#")
6k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Go package](https://www.nuget.org/packages/Aspire.Hosting.Go)
Aspire.Hosting.Integration.Analyzers
Analyzers for Aspire hosting integration authors.
hostinganalyzersats
```bash
aspire add integration-analyzers
```
5k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Integration.Analyzers package](https://www.nuget.org/packages/Aspire.Hosting.Integration.Analyzers)
[CommunityToolkit.Aspire.Hosting.Dapr.AzureRedis](/integrations/frameworks/dapr/dapr-get-started/ "CommunityToolkit.Aspire.Hosting.Dapr.AzureRedis")
Package Description
communitytoolkit
```bash
aspire add communitytoolkit-dapr-azureredis
```
[](/integrations/frameworks/dapr/dapr-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Dapr.AzureRedis documentation in TypeScript")[](/integrations/frameworks/dapr/dapr-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Dapr.AzureRedis documentation in C#")
5k
Version 9.1.1-beta.197
[PackageVisit CommunityToolkit.Aspire.Hosting.Dapr.AzureRedis package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Dapr.AzureRedis)
Aspire.Hosting.Blazor
Blazor WebAssembly hosting support for Aspire.
hostingblazorwebassembly+2
```bash
aspire add blazor
```
5k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Blazor package](https://www.nuget.org/packages/Aspire.Hosting.Blazor)
Aspire.Hosting.AgentFramework.DevUI
Microsoft Agent Framework DevUI support for Aspire.
hostingagent-frameworkdevui+2
```bash
aspire add agentframework-devui
```
4k
Version 1.20.0-preview\.260831.1
[PackageVisit Aspire.Hosting.AgentFramework.DevUI package](https://www.nuget.org/packages/Aspire.Hosting.AgentFramework.DevUI)
[Aspire.Hosting.Azure.Kubernetes](/integrations/cloud/azure/aks/ "Aspire.Hosting.Azure.Kubernetes")
Azure Kubernetes Service (AKS) resource types for Aspire.
hostingazurekubernetes+2
```bash
aspire add azure-kubernetes
```
[](/integrations/cloud/azure/aks/?aspire-lang=typescript "View Aspire.Hosting.Azure.Kubernetes documentation in TypeScript")[](/integrations/cloud/azure/aks/?aspire-lang=csharp "View Aspire.Hosting.Azure.Kubernetes documentation in C#")
3k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Azure.Kubernetes package](https://www.nuget.org/packages/Aspire.Hosting.Azure.Kubernetes)
Aspire.Hosting.CodeGeneration.Java
Package Description
```bash
aspire add codegeneration-java
```
3k
Version 13.5.3
[PackageVisit Aspire.Hosting.CodeGeneration.Java package](https://www.nuget.org/packages/Aspire.Hosting.CodeGeneration.Java)
Aspire.Hosting.CodeGeneration.Python
Package Description
```bash
aspire add codegeneration-python
```
3k
Version 13.5.3
[PackageVisit Aspire.Hosting.CodeGeneration.Python package](https://www.nuget.org/packages/Aspire.Hosting.CodeGeneration.Python)
Aspire.Hosting.CodeGeneration.Rust
Package Description
```bash
aspire add codegeneration-rust
```
3k
Version 13.5.3
[PackageVisit Aspire.Hosting.CodeGeneration.Rust package](https://www.nuget.org/packages/Aspire.Hosting.CodeGeneration.Rust)
CommunityToolkit.Aspire.Hosting.RustFs
An Aspire hosting integration for the RustFS S3-compatible object storage container.
communitytoolkithostingrustfs+3
```bash
aspire add communitytoolkit-rustfs
```
3k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.RustFs package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.RustFs)
CommunityToolkit.Aspire.Hosting.Zitadel
An Aspire hosting integration for the ZITADEL identity and access management container.
communitytoolkitzitadelauth+6
```bash
aspire add communitytoolkit-zitadel
```
2k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Zitadel package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Zitadel)
CommunityToolkit.Aspire.Hosting.Umami
Umami support for Aspire.
communitytoolkithostingumamipolyglot
```bash
aspire add communitytoolkit-umami
```
2k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Umami package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Umami)
[CommunityToolkit.Aspire.Hosting.Perl](/integrations/frameworks/perl/perl-get-started/ "CommunityToolkit.Aspire.Hosting.Perl")
An Aspire hosting integration for hosting Perl apps.
communitytoolkithostingperlpolyglot
```bash
aspire add communitytoolkit-perl
```
[](/integrations/frameworks/perl/perl-host/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Perl documentation in TypeScript")[](/integrations/frameworks/perl/perl-host/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Perl documentation in C#")
2k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Perl package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Perl)
CommunityToolkit.Aspire.Hosting.SeaweedFS
Provides extension methods and resource definitions for the Aspire AppHost to support running SeaweedFS containers with an S3-compatible API.
communitytoolkitseaweedfshosting+4
```bash
aspire add communitytoolkit-seaweedfs
```
2k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.SeaweedFS package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.SeaweedFS)
CommunityToolkit.Aspire.Hosting.DuckDB
An Aspire hosting integration for providing a DuckDB database connection.
communitytoolkithostingduckdb+3
```bash
aspire add communitytoolkit-duckdb
```
2k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.DuckDB package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.DuckDB)
[CommunityToolkit.Aspire.Hosting.K3s](/integrations/compute/k3s/ "CommunityToolkit.Aspire.Hosting.K3s")
An Aspire hosting integration for k3s. Provides AddK3sCluster, AddHelmRelease (via alpine/helm), AddK8sManifest with Kustomize support (via alpine/kubectl), and AddServiceEndpoint for in-process WebSocket port-forwarding. No host-side kubectl or helm required.
communitytoolkitkubernetesk3s+3
```bash
aspire add communitytoolkit-k3s
```
[](/integrations/compute/k3s/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.K3s documentation in TypeScript")[](/integrations/compute/k3s/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.K3s documentation in C#")
1k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.K3s package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.K3s)
CommunityToolkit.Aspire.Hosting.Logto
Aspire hosting extensions for Logto (includes PostgreSQL and Redis integration).
communitytoolkitlogtoredis+4
```bash
aspire add communitytoolkit-logto
```
1k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Logto package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Logto)
CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager
An Aspire hosting integration for Bitwarden Secrets Manager.
communitytoolkithostingbitwarden+3
```bash
aspire add communitytoolkit-bitwarden-secretmanager
```
1k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Bitwarden.SecretManager)
CommunityToolkit.Aspire.Hosting.Squad
An Aspire hosting integration for Squad AI-agent teams. Models a \`.squad/\` workspace as a first-class Aspire resource that auto-discovers the team roster and exposes it via WithReference for downstream services.
communitytoolkithostingsquad+4
```bash
aspire add communitytoolkit-squad
```
1k
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Squad package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Squad)
Aspire.Hosting.DocumentDB
DocumentDB support for Aspire. Provides extension methods and resource definitions for an Aspire AppHost to configure a DocumentDB resource.
hostingdocumentdbmongodb+3
```bash
aspire add documentdb
```
1k
Version 0.116.0
[PackageVisit Aspire.Hosting.DocumentDB package](https://www.nuget.org/packages/Aspire.Hosting.DocumentDB)
[Aspire.Hosting.Dotnet](/integrations/frameworks/dotnet/dotnet-get-started/ "Aspire.Hosting.Dotnet")
C# and .NET application support for Aspire.
hostingdotnetcsharp+3
```bash
aspire add dotnet
```
[](/integrations/frameworks/dotnet/dotnet-host/?aspire-lang=typescript "View Aspire.Hosting.Dotnet documentation in TypeScript")[](/integrations/frameworks/dotnet/dotnet-host/?aspire-lang=csharp "View Aspire.Hosting.Dotnet documentation in C#")
1k
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Dotnet package](https://www.nuget.org/packages/Aspire.Hosting.Dotnet)
CommunityToolkit.Aspire.Hosting.Listmonk
listmonk support for Aspire.
communitytoolkithostinglistmonk+4
```bash
aspire add communitytoolkit-listmonk
```
901
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Listmonk package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Listmonk)
CommunityToolkit.Aspire.Hosting.Kind
An Aspire hosting integration for Kind that manages local Kind clusters for development with Docker or Podman.
communitytoolkithostingkind+5
```bash
aspire add communitytoolkit-kind
```
809
Version 13.5.1-beta.748
[PackageVisit CommunityToolkit.Aspire.Hosting.Kind package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Kind)
[CommunityToolkit.Aspire.Hosting.Floci](/integrations/compute/floci/ "CommunityToolkit.Aspire.Hosting.Floci")
An Aspire hosting integration for the Floci local cloud emulators: AddFlociAws (AWS), AddFlociAzure (Azure) and AddFlociGcp (GCP). Includes a WithFlociUI() extension for running the Floci UI web console alongside one or more emulators.
communitytoolkitflociaws+9
```bash
aspire add communitytoolkit-floci
```
[](/integrations/compute/floci/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Floci documentation in TypeScript")[](/integrations/compute/floci/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Floci documentation in C#")
705
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Floci package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Floci)
CommunityToolkit.Aspire.Hosting.RedPanda
An Aspire hosting package for the Redpanda Kafka-compatible streaming platform.
communitytoolkithostingredpanda+4
```bash
aspire add communitytoolkit-redpanda
```
453
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.RedPanda package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.RedPanda)
CommunityToolkit.Aspire.Hosting.Posta
An Aspire hosting integration for Posta.
communitytoolkithostingposta+4
```bash
aspire add communitytoolkit-posta
```
407
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Posta package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Posta)
CommunityToolkit.Aspire.Hosting.Mosquitto
An Aspire hosting package for hosting the Mosquitto MQTT broker.
communitytoolkithostingmosquitto+3
```bash
aspire add communitytoolkit-mosquitto
```
382
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Mosquitto package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Mosquitto)
CommunityToolkit.Aspire.Hosting.StableDiffusionCpp
An Aspire hosting integration for the stable-diffusion.cpp image generation server.
communitytoolkithostingstable-diffusion+4
```bash
aspire add communitytoolkit-stablediffusioncpp
```
375
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.StableDiffusionCpp package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.StableDiffusionCpp)
Aspire.Hosting.Radius
Provides extensions and resource definitions for an Aspire AppHost to publish and deploy applications to a Radius (radapp.io) compute environment.
hostingradiusradapp+2
```bash
aspire add radius
```
251
Version 13.5.3-preview\.1.26425.3
[PackageVisit Aspire.Hosting.Radius package](https://www.nuget.org/packages/Aspire.Hosting.Radius)
[CommunityToolkit.Aspire.Hosting.Floci](/integrations/compute/floci/ "CommunityToolkit.Aspire.Hosting.Floci")
An Aspire hosting integration for the Floci local cloud emulators: AddFlociAws (AWS), AddFlociAzure (Azure) and AddFlociGcp (GCP). Includes a WithFlociUI() extension for running the Floci UI web console alongside one or more emulators.
communitytoolkitflociaws+8
```bash
aspire add communitytoolkit-floci
```
[](/integrations/compute/floci/?aspire-lang=typescript "View CommunityToolkit.Aspire.Hosting.Floci documentation in TypeScript")[](/integrations/compute/floci/?aspire-lang=csharp "View CommunityToolkit.Aspire.Hosting.Floci documentation in C#")
100
Version 13.5.0
[PackageVisit CommunityToolkit.Aspire.Hosting.Floci package](https://www.nuget.org/packages/CommunityToolkit.Aspire.Hosting.Floci)
No integrations found
Try searching for things like "SQL", "Cache", or "Redis" to discover integrations!
# Connect to Apache Kafka
> Learn how to connect to Apache Kafka from C#, Go, Python, and TypeScript consuming apps in an Aspire solution.

This page describes how consuming apps connect to a Kafka resource that’s already modeled in your AppHost. For the AppHost API surface — adding a Kafka server, Kafka UI, data volumes, and more — see [Apache Kafka Hosting integration](../apache-kafka-host/).
When you reference a Kafka resource from your AppHost, Aspire injects the connection information into the consuming app as environment variables. Your app can either read those environment variables directly — the pattern works the same from any language — or, in C#, use the Aspire Confluent Kafka client integration for automatic dependency injection of producers and consumers, health checks, and telemetry.
## Connection properties
[Section titled “Connection properties”](#connection-properties)
Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Host` property of a resource called `kafka` becomes `KAFKA_HOST`.
The Kafka server resource exposes the following connection properties:
| Property Name | Description |
| ------------- | ----------------------------------------------------- |
| `Host` | The host-facing Kafka listener hostname or IP address |
| `Port` | The host-facing Kafka listener port |
**Example connection string:**
```plaintext
ConnectionStrings__kafka: localhost:9092
```
Note
Aspire also injects the connection string directly into the `ConnectionStrings` section. The full bootstrap-servers string (for example, `localhost:9092`) is injected under the key matching the resource name.
## Connect from your app
[Section titled “Connect from your app”](#connect-from-your-app)
Pick the language your consuming app is written in. Each example assumes your AppHost adds a Kafka resource named `kafka` and references it from the consuming app.
* C#
For C# apps, the recommended approach is the Aspire Confluent Kafka client integration. It registers an [`IProducer`](https://docs.confluent.io/platform/current/clients/confluent-kafka-dotnet/_site/api/Confluent.Kafka.IProducer-2.html) and/or [`IConsumer`](https://docs.confluent.io/platform/current/clients/confluent-kafka-dotnet/_site/api/Confluent.Kafka.IConsumer-2.html) through dependency injection and adds health checks and telemetry automatically. If you’d rather read environment variables directly, use the `ConnectionStrings` section value as the bootstrap server address.
### Install the client integration
[Section titled “Install the client integration”](#install-the-client-integration)
Install the [📦 Aspire.Confluent.Kafka](https://www.nuget.org/packages/Aspire.Confluent.Kafka) NuGet package in the client-consuming project:
* .NET CLI
.NET CLI — Add Aspire.Confluent.Kafka package
```bash
dotnet add package Aspire.Confluent.Kafka
```
* Program.cs (C# file-based app)
Program.cs
```csharp
#:package Aspire.Confluent.Kafka@*
```
* PackageReference (\*.csproj)
XML — Add Aspire.Confluent.Kafka package reference
```xml
```
### Add a Kafka producer
[Section titled “Add a Kafka producer”](#add-a-kafka-producer)
In *Program.cs*, call `AddKafkaProducer` on your `IHostApplicationBuilder` to register an `IProducer`:
Program.cs
```csharp
builder.AddKafkaProducer(connectionName: "kafka");
```
Tip
The `connectionName` must match the Kafka resource name from the AppHost. For more information, see [Add Kafka server resource](../apache-kafka-host/#add-kafka-server-resource).
Resolve the producer through dependency injection:
ExampleService.cs
```csharp
public class ExampleService(IProducer producer)
{
// Use producer...
}
```
### Add a Kafka consumer
[Section titled “Add a Kafka consumer”](#add-a-kafka-consumer)
Call `AddKafkaConsumer` to register an `IConsumer`:
Program.cs
```csharp
builder.AddKafkaConsumer(connectionName: "kafka");
```
Note
`Confluent.Kafka.Consumer` requires the `ClientId` property to be set so the broker can track consumed message offsets. Set it through the configuration key `Aspire:Confluent:Kafka:Consumer:Config:ClientId` or via an inline delegate.
Resolve the consumer through dependency injection:
ExampleService.cs
```csharp
public class ExampleService(IConsumer consumer)
{
// Use consumer...
}
```
### Add keyed Kafka producers or consumers
[Section titled “Add keyed Kafka producers or consumers”](#add-keyed-kafka-producers-or-consumers)
To register multiple producer or consumer instances with different connection names, use the keyed variants:
Program.cs
```csharp
builder.AddKeyedKafkaProducer(name: "orders");
builder.AddKeyedKafkaConsumer(name: "events");
```
Then resolve each instance by key:
ExampleService.cs
```csharp
public class ExampleService(
[FromKeyedServices("orders")] IProducer ordersProducer,
[FromKeyedServices("events")] IConsumer eventsConsumer)
{
// Use producers and consumers...
}
```
### Configuration
[Section titled “Configuration”](#configuration)
The Aspire Confluent Kafka client integration offers multiple ways to provide configuration.
**Connection strings.** When using a connection string from the `ConnectionStrings` configuration section, pass the connection name to `AddKafkaProducer` or `AddKafkaConsumer`:
Program.cs
```csharp
builder.AddKafkaProducer("kafka");
```
The connection string is resolved from the `ConnectionStrings` section:
appsettings.json
```json
{
"ConnectionStrings": {
"kafka": "localhost:9092"
}
}
```
**Configuration providers.** The client integration supports `Microsoft.Extensions.Configuration`. It loads `KafkaProducerSettings` or `KafkaConsumerSettings` from *appsettings.json* (or any other configuration source) using the `Aspire:Confluent:Kafka:Producer` and `Aspire:Confluent:Kafka:Consumer` keys:
appsettings.json
```json
{
"Aspire": {
"Confluent": {
"Kafka": {
"Producer": {
"DisableHealthChecks": false,
"Config": {
"Acks": "All"
}
},
"Consumer": {
"DisableHealthChecks": false,
"Config": {
"ClientId": "my-consumer",
"GroupId": "my-group"
}
}
}
}
}
}
```
The `Config` properties bind to instances of `ProducerConfig` and `ConsumerConfig` from the `Confluent.Kafka` library.
**Named configuration.** The integration supports named configuration for multiple instances:
appsettings.json
```json
{
"Aspire": {
"Confluent": {
"Kafka": {
"Producer": {
"orders": {
"Config": { "Acks": "All" }
},
"audit": {
"Config": { "Acks": "Leader" }
}
}
}
}
}
}
```
**Inline delegates.** Pass an `Action` to configure settings inline, for example to disable health checks:
Program.cs
```csharp
builder.AddKafkaProducer(
"kafka",
static settings => settings.DisableHealthChecks = true);
```
To configure the underlying `Confluent.Kafka` builder, pass an `Action>`:
Program.cs
```csharp
builder.AddKafkaProducer(
"kafka",
static producerBuilder =>
{
var messageSerializer = new MyMessageSerializer();
producerBuilder.SetValueSerializer(messageSerializer);
});
```
### Client integration health checks
[Section titled “Client integration health checks”](#client-integration-health-checks)
Aspire client integrations enable health checks by default. The Confluent Kafka client integration adds:
* The `Aspire.Confluent.Kafka.Producer` health check when `DisableHealthChecks` is `false`.
* The `Aspire.Confluent.Kafka.Consumer` health check when `DisableHealthChecks` is `false`.
* Integration with the `/health` HTTP endpoint, where all registered health checks must pass before the app is considered ready to accept traffic.
### Observability and telemetry
[Section titled “Observability and telemetry”](#observability-and-telemetry)
The Aspire Confluent Kafka client integration automatically configures logging, tracing, and metrics through OpenTelemetry.
**Logging** categories:
* `Aspire.Confluent.Kafka`
**Tracing:** The Apache Kafka integration doesn’t currently emit distributed traces.
**Metrics** emitted through OpenTelemetry:
* `messaging.kafka.network.tx`
* `messaging.kafka.network.transmitted`
* `messaging.kafka.network.rx`
* `messaging.kafka.network.received`
* `messaging.publish.messages`
* `messaging.kafka.message.transmitted`
* `messaging.receive.messages`
* `messaging.kafka.message.received`
### Read environment variables in C\#
[Section titled “Read environment variables in C#”](#read-environment-variables-in-c)
If you prefer not to use the Aspire client integration, you can read the Aspire-injected bootstrap server address from the environment and pass it directly to `Confluent.Kafka`:
Program.cs
```csharp
using Confluent.Kafka;
var bootstrapServers = Environment.GetEnvironmentVariable("KAFKA_HOST") + ":"
+ Environment.GetEnvironmentVariable("KAFKA_PORT");
using var producer = new ProducerBuilder(
new ProducerConfig { BootstrapServers = bootstrapServers })
.Build();
// Use producer...
```
* Go
.NET CLI — Add Aspire.Confluent.Kafka package
```bash
dotnet add package Aspire.Confluent.Kafka
```
* Python
Program.cs
```csharp
#:package Aspire.Confluent.Kafka@*
```
* TypeScript
XML — Add Aspire.Confluent.Kafka package reference
```xml