🔎 Nx is a set of Extensible Dev Tools for Monorepos and NxDotnet is one of the many plugins of Nx, which add capabilities for developing dotnet applications such as generating applications, libraries, etc as well as the devtools to test, and build projects as well.
After creating an Nx workspace (check here to see how to create an Nx workspace), open a command line interface (CLI) like Windows PowerShell inside your existing workspace and run the command below to add .Net capabilities to your workspace.
yarn add @nx-dotnet/core
To generate an application run:
nx g @nx-dotnet/core:app my-app
To generate a library run:
nx g @nx-dotnet/core:lib my-lib
For a dev server, run the command below. This command can automatically reload if any of source file changes by watching for file changes and rebuilding the project.
nx serve my-app
To build the project run:
nx build my-app
and for a production build, run:
nx build my-app --prod
In order to see dependency diagaram of your application(s) and lib(s), run the command below: