CommunityToolkit.Aspire.Hosting.JavaScript.Extensions 13.0.0-beta.444

Prefix Reserved
This is a prerelease version of CommunityToolkit.Aspire.Hosting.JavaScript.Extensions.
dotnet add package CommunityToolkit.Aspire.Hosting.JavaScript.Extensions --version 13.0.0-beta.444
                    
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.JavaScript.Extensions -Version 13.0.0-beta.444
                    
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="CommunityToolkit.Aspire.Hosting.JavaScript.Extensions" Version="13.0.0-beta.444" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.JavaScript.Extensions" Version="13.0.0-beta.444" />
                    
Directory.Packages.props
<PackageReference Include="CommunityToolkit.Aspire.Hosting.JavaScript.Extensions" />
                    
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 CommunityToolkit.Aspire.Hosting.JavaScript.Extensions --version 13.0.0-beta.444
                    
#r "nuget: CommunityToolkit.Aspire.Hosting.JavaScript.Extensions, 13.0.0-beta.444"
                    
#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 CommunityToolkit.Aspire.Hosting.JavaScript.Extensions@13.0.0-beta.444
                    
#: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=CommunityToolkit.Aspire.Hosting.JavaScript.Extensions&version=13.0.0-beta.444&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.JavaScript.Extensions&version=13.0.0-beta.444&prerelease
                    
Install as a Cake Tool

CommunityToolkit.Aspire.Hosting.JavaScript.Extensions library

This integration contains extensions for the Node.js hosting package for Aspire, including support for frontend monorepos (Nx, Turborepo).

Getting Started

Install the package

In your AppHost project, install the package using the following command:

dotnet add package CommunityToolkit.Aspire.Hosting.JavaScript.Extensions

Example usage

For Nx and Turborepo monorepos, use the dedicated monorepo methods to avoid package installation race conditions:

// Nx workspace
var nx = builder.AddNxApp("nx", workingDirectory: "../frontend")
    .WithYarn()
    .WithPackageManagerLaunch(); // Automatically uses yarn from installer

var app1 = nx.AddApp("app1");
var app2 = nx.AddApp("app2", appName: "my-app-2");

// Turborepo workspace
var turbo = builder.AddTurborepoApp("turbo", workingDirectory: "../frontend")
    .WithPackageManagerLaunch("pnpm"); // Explicitly specify pnpm

var turboApp1 = turbo.AddApp("app1");
var turboApp2 = turbo.AddApp("app2", filter: "custom-filter");

See MONOREPO.md for detailed documentation on monorepo support.

Configuring Package Manager for Monorepos

The WithPackageManagerLaunch() method configures which package manager command is used when running individual apps in Nx or Turborepo workspaces:

// Auto-infer from package installer
var nx = builder.AddNxApp("nx", workingDirectory: "../frontend")
    .WithYarn()
    .WithPackageManagerLaunch(); // Uses 'yarn' command

// Explicitly specify package manager
var turbo = builder.AddTurborepoApp("turbo", workingDirectory: "../frontend")
    .WithPnpm()
    .WithPackageManagerLaunch("pnpm"); // Uses 'pnpm' command

// Generated commands:
// Nx with yarn: yarn nx serve app1
// Turborepo with pnpm: pnpm turbo run dev --filter app1

Package installation with custom flags

You can pass additional flags to package managers during installation:

// yarn with frozen lockfile
builder.AddYarnApp("yarn-app", "./path/to/app")
    .WithYarnPackageInstallation(configureInstaller =>
    {
        configureInstaller.WithArgs("--frozen-lockfile", "--verbose");
    })
    .WithExternalHttpEndpoints();

// pnpm with frozen lockfile
builder.AddPnpmApp("pnpm-app", "./path/to/app")
    .WithPnpmPackageInstallation(configureInstaller =>
    {
        configureInstaller.WithArgs("--frozen-lockfile");
    })
    .WithExternalHttpEndpoints();

Additional Information

https://learn.microsoft.com/dotnet/aspire/community-toolkit/hosting-nodejs-extensions

Feedback & contributing

https://github.com/CommunityToolkit/Aspire

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
13.0.0-beta.444 193 11/17/2025