JSPM

@nx/dotnet

22.2.0-canary.20251126-3558a4c
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12687
  • Score
    100M100P100Q130706F
  • License MIT

The Nx Plugin for .NET containing graph support for working with .NET projects in an Nx workspace.

Package Exports

  • @nx/dotnet
  • @nx/dotnet/generators.json
  • @nx/dotnet/generators/init/schema
  • @nx/dotnet/generators/init/schema.json
  • @nx/dotnet/migrations.json
  • @nx/dotnet/package.json
  • @nx/dotnet/plugin

Readme

Nx - Smart Repos · Fast Builds

CircleCI License NPM Version Semantic Release Commitizen friendly Join the chat at https://gitter.im/nrwl-nx/community Join us on the Official Nx Discord Server


Note: The @nx/dotnet plugin is currently experimental. Features and APIs may change.

Nx: Smart Repos · Fast Builds

Get to green PRs in half the time. Nx optimizes your builds, scales your CI, and fixes failed PRs. Built for developers and AI agents.

Build .NET with Nx

The goal of @nx/dotnet is to make it easy and straightforward to build .NET applications in an Nx workspace. It provides intelligent project graph analysis, automatic dependency detection, and smart target configuration using MSBuild.

Getting Started

Step 1: Add the .NET plugin to your Nx workspace

nx add @nx/dotnet

Step 2: Configure the plugin in your nx.json

{
  "plugins": ["@nx/dotnet"]
}

Step 3: Create your .NET projects

# Create a console application
dotnet new console -n MyApp

# Create a class library
dotnet new classlib -n MyLibrary

# Create a test project
dotnet new xunit -n MyApp.Tests

The plugin will automatically detect your .NET projects and configure appropriate Nx targets.

Step 4: Run Build, Test, and other commands

# Build a project
nx build my-app

# Run tests
nx test my-app-tests

# Build with Release configuration
nx build my-app --configuration Release

# Create a NuGet package
nx pack my-library

# Publish an application
nx publish my-app

Getting Started

Creating an Nx Workspace

Using npx

npx create-nx-workspace

Using npm init

npm init nx-workspace

Using yarn create

yarn create nx-workspace

Adding Nx to an Existing Repository

Run:

npx nx@latest init

Documentation & Resources

Nx - Smart Repos · Fast Builds