npm package: @nx/dotnet
Description: The Nx Plugin for .NET containing graph support for working with .NET projects in an Nx workspace.
Author: Victor Savkin
Latest version: 22.6.5

<p style="text-align: center;">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
    <img alt="Nx - Smart Monorepos · Fast Builds" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
  </picture>
</p>

<div style="text-align: center;">

[![CircleCI](https://circleci.com/gh/nrwl/nx.svg?style=svg)](https://circleci.com/gh/nrwl/nx)
[![License](https://img.shields.io/npm/l/@nx/workspace.svg?style=flat-square)]()
[![NPM Version](https://badge.fury.io/js/nx.svg)](https://www.npmjs.com/package/nx)
[![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)]()
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![Join the chat at https://gitter.im/nrwl-nx/community](https://badges.gitter.im/nrwl-nx/community.svg)](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Join us on the Official Nx Discord Server](https://img.shields.io/discord/1143497901675401286?label=discord)](https://go.nx.dev/community)

</div>


<hr>

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

# Nx: Smart Monorepos · 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

```bash
nx add @nx/dotnet
```

#### Step 2: Configure the plugin in your `nx.json`

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

#### Step 3: Create your .NET projects

```bash
# 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

```bash
# 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`**

```bash
npx create-nx-workspace
```

**Using `npm init`**

```bash
npm init nx-workspace
```

**Using `yarn create`**

```bash
yarn create nx-workspace
```

### Adding Nx to an Existing Repository

Run:

```bash
npx nx@latest init
```

## Documentation & Resources

- [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
- [Intro to Nx](https://nx.dev/getting-started/intro)
- [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
- [Blog Posts About Nx](https://nx.dev/blog)

<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg" 
width="100%" alt="Nx - Smart Monorepos · Fast Builds"></a></p>