Aspire.Hosting.JavaScript 17.0.0

Prefix Reserved
dotnet add package Aspire.Hosting.JavaScript --version 17.0.0
                    
NuGet\Install-Package Aspire.Hosting.JavaScript -Version 17.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aspire.Hosting.JavaScript" Version="17.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aspire.Hosting.JavaScript" Version="17.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Aspire.Hosting.JavaScript" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aspire.Hosting.JavaScript --version 17.0.0
                    
#r "nuget: Aspire.Hosting.JavaScript, 17.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aspire.Hosting.JavaScript@17.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aspire.Hosting.JavaScript&version=17.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Aspire.Hosting.JavaScript&version=17.0.0
                    
Install as a Cake Tool

JavaScript app hosting integration

Use this integration to model, configure, and orchestrate JavaScript projects in an Aspire solution.

Getting started

Add the integration

From your AppHost directory, add the Aspire.Hosting.JavaScript integration with the Aspire CLI:

aspire add Aspire.Hosting.JavaScript

Usage example

In the AppHost, add a JavaScript app resource with either C# or TypeScript:

C#

var builder = DistributedApplication.CreateBuilder(args);

builder.AddJavaScriptApp("frontend", "../frontend", "dev");

builder.Build().Run();

TypeScript

import { createBuilder } from "./.aspire/modules/aspire.mjs";

const builder = await createBuilder();

await builder.addJavaScriptApp("frontend", "../frontend", { runScriptName: "dev" });

await builder.build().run();

Runtime and framework-specific apps

Use the most specific helper for the runtime or framework hosting the app:

Runtime or framework C# / TypeScript APIs Use
Node.js AddNodeApp / addNodeApp Run a JavaScript or TypeScript entry point with Node.js.
Bun AddBunApp / addBunApp Run an entry point with Bun.
Deno AddDenoApp / addDenoApp Run an entry point with Deno.
Vite AddViteApp / addViteApp Run a Vite development server and publish the app as a container.
Next.js AddNextJsApp / addNextJsApp Run and publish a Next.js application.

The runtime used for local development must be installed and available on PATH. Deno apps run their entry point directly by default; use WithDenoTask, WithDenoServe, and the other WithDeno* APIs to select another mode or configure permissions and runtime flags.

Publishing

Next.js hosting and the JavaScript publishing helpers are stable APIs and do not require suppressing ASPIREJAVASCRIPT001. Choose the publish shape that matches the framework's production output:

API Published container
AddNextJsApp Node.js running Next.js standalone output, including public/ and .next/static/.
PublishAsStaticWebsite YARP serving the built static files, with optional API reverse-proxying. PublishAsStaticWebsiteOptions.OutputPath defaults to dist.
PublishAsNodeServer Node.js running the specified built entry point directly.
PublishAsPackageScript The configured package manager running a production script, with its runtime dependencies.

AddNextJsApp requires output: "standalone" in the Next.js configuration and a public/ directory for the generated Dockerfile. Use DisableBuildValidation() only when the configuration is provided dynamically and cannot be statically inspected; it does not change the required build output. User-authored Dockerfiles are preserved rather than replaced by generated Dockerfiles.

Deno runtime and publishing

The Deno hosting APIs are stable and do not require suppressing ASPIREDENO001. Aspire tests Deno with version 2.9.0, and generated Dockerfiles default to denoland/deno:2.9.0 for both build and runtime stages. Local execution uses the Deno installation on PATH; WithDockerfileBaseImage can override the container images. Use a runtime version that supports the flags and features your application selects. Stability of the Aspire APIs does not make Deno's opt-in --unstable-* features stable.

Configuration Local execution Generated container
Default entry point deno run -A <script> deno run --allow-net --allow-env --cached-only <script> with dependencies cached during the build.
Permissions WithDenoAllow and WithDenoDeny configure explicit permissions; WithDenoAllowAll(false) disables the blanket grant. Explicit permissions are preserved; deny-only configuration narrows the network/environment defaults. WithDenoAllowAll(true) explicitly grants all permissions in both modes.
Watch and inspector WithDenoWatch and WithDenoInspect enable development flags for run/serve modes. Managed watch and inspector flags are omitted.
Serve mode WithDenoServe runs deno serve with an Aspire-managed HTTP endpoint. Binds to 0.0.0.0 and the endpoint's target port (8000 by default).
Task mode WithDenoTask or WithRunScript runs deno task; the task defines its own permissions and development flags. Runs the selected task without inferring or pre-caching its module graph. Tasks must provide their own production-appropriate command.

Generated Deno Dockerfiles do not support manual node_modules mode, alternate package managers, --env-file, or configuration paths outside the app directory. Use a custom Dockerfile when these are required.

Additional documentation

https://aspire.dev/integrations/gallery/ https://aspire.dev/integrations/frameworks/javascript/ https://github.com/microsoft/aspire-samples/tree/main/samples/aspire-with-javascript https://github.com/microsoft/aspire-samples/tree/main/samples/aspire-with-node https://docs.deno.com/runtime/

Feedback & contributing

https://github.com/microsoft/aspire

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (14)

Showing the top 5 NuGet packages that depend on Aspire.Hosting.JavaScript:

Package Downloads
HotChocolate.Fusion.Aspire

Package Description

CommunityToolkit.Aspire.Hosting.JavaScript.Extensions

An Aspire integration for hosting NodeJS apps using Vite, Yarn, PNPM, or NPM.

CommunityToolkit.Aspire.Hosting.McpInspector

An Aspire hosting integration to run the MCP Inspector against a Model Context Protocol (MCP) server.

Dutchskull.Aspire.PolyRepo

A description of your package.

Trifork.Aspire.Hosting.Corax

Aspire hosting integration that runs Corax Core and its dependencies locally.

GitHub repositories (19)

Showing the top 19 popular GitHub repositories that depend on Aspire.Hosting.JavaScript:

Repository Stars
jasontaylordev/CleanArchitecture
Clean Architecture Solution Template for ASP.NET Core
fullstackhero/dotnet-starter-kit
Production Grade Cloud-Ready .NET 10 Starter Kit (Web API + React Client) with Multitenancy Support, and Clean/Modular Architecture that saves roughly 200+ Development Hours! All Batteries Included.
exceptionless/Exceptionless
Exceptionless application
aptabase/aptabase
✨ Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps
microsoft/aspire-samples
Browse the sample apps demonstrating Aspire integration across C#, JavaScript, TypeScript, Python, Go, containers, databases, cloud, AI, and observability scenarios.
colinin/abp-next-admin
This is a front-end management project based on the vue-vben-admin template and is suitable for ABP vNext.
cmu-sei/GHOSTS
GHOSTS (General Human-Oriented Synthetic Teammates and Systems) is a realistic user simulation framework for cyber experimentation, simulation, training, and exercise
CommunityToolkit/Aspire
A community project with additional components and extensions for Aspire
platformplatform/PlatformPlatform
A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc.
J-Tech-Japan/Sekiban
Sekiban - an Opinionated Event Sourcing and CQRS Framework using C#. It can store data into Azure Cosmos DB, AWS Dynamo DB or Postgres
davidfowl/aspire-ai-chat-demo
Aspire AI Chat is a full-stack chat sample that combines modern technologies to deliver a ChatGPT-like experience.
fpindej/netrock
SaaS starter kit for small productions - .NET 10 Clean Architecture API + SvelteKit frontend, fully dockerized. Fork it, init it, build your product..
nightscout/nocturne
A next-generation platform for diabetes management
Keboo/DotnetTemplates
A repository for my dotnet templates
zhuyongzhengs/Rex.ShopMicroService.Sample
一个基于ABP Framework 10.0、PostgreSQL、MongoDB、Redis、RabbitMQ、CAP、ElasticSearch、Minio、YARP的微服务电商商城平台,采用主流的互联网技术架构、全新的UI设计、可视化布局、支持集群部署;拥有活动促销、优惠卷、商品秒杀等众多完整的营销功能。
Dutchskull/Aspire.PolyRepo
This library for DotNet Aspire enables poly repo support and the addition of Git repositories to your Aspire projects. It simplifies multi-repository management and streamlines dependency handling, making it easier to work with multiple repositories in a Aspire project.
swdriessen/starlights
A work-in-progress project intended as an online toolset to enhance tabletop role‑playing games. “Aurora Online”
baotoq/micro-commerce
.NET 10 .NET Aspire
nashtech-garage/ntg-agent
A sample Chatbot in C# using Microsoft Agent Framework
Version Downloads Last Updated
17.0.0 0 11/18/2026
13.6.5 224,483 11/10/2026
13.6.4 319,177 10/24/2026
13.6.3 58,719 10/21/2026
13.6.2 42,684 10/20/2026
13.6.1 380,319 10/7/2026
13.6.0 257,055 9/29/2026
13.5.4 374,100 9/15/2026
13.5.3 485,025 8/25/2026
13.5.2 100,877 8/21/2026
13.5.1 37,382 8/20/2026
13.5.0 95,092 8/18/2026
13.4.6 1,283,101 6/19/2026
13.4.5 106,856 6/17/2026
13.4.4 62,944 6/15/2026
13.4.3 135,515 6/8/2026
13.4.2 61,539 6/3/2026
13.4.1 6,182 6/3/2026
13.4.0 183,193 6/1/2026
13.3.5 264,627 5/21/2026
Loading failed