@nx/dotnet - Generators
The @nx/dotnet plugin provides various generators to help you create and configure dotnet projects within your Nx workspace. Below is a complete reference for all available generators and their options.
init
Initializes a .NET project in the current workspace.
Usage:
nx generate @nx/dotnet:init [options]Options
| Option | Type | Description | Default |
|---|---|---|---|
keepExistingVersions | boolean | Keep existing dependencies versions | false |
skipFormat | boolean | Skip formatting files. | false |
skipPackageJson | boolean | Do not add dependencies to package.json. | false |
updatePackageScripts | boolean | Update package.json scripts with inferred targets | false |
migrate-from-nx-dotnet
Migrates a workspace from @nx-dotnet/core to @nx/dotnet.
Usage:
nx generate @nx/dotnet:migrate-from-nx-dotnet [options]Options
| Option | Type | Description | Default |
|---|---|---|---|
keepExistingVersions | boolean | Keep existing dependencies versions | false |
removeNxDotnetCore | boolean | Remove @nx-dotnet/core packages from package.json (only recommended after completing manual migration steps) | false |
removeRcFile | boolean | Remove .nx-dotnet.rc.json file after migration | true |
skipFormat | boolean | Skip formatting files. | false |
skipGitCheck | boolean | Skip checking for clean git state before migration | false |
skipPackageJson | boolean | Do not update package.json dependencies. | false |
## Getting Help
You can get help for any generator by adding the `--help` flag:
```bash nx generate @nx/dotnet:<generator> --help ```