16
Introducing NxDotnet

🔎 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 (How to set up an Nx workspace? Click here!), 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:
nx dep-graph