A solid starting point for your new Nx based .NET MonoRepo.
- pnpm workspace
- Nx
- nx-dotnet plugin
- semantic-release
- GitHub Actions for linting PR title with Conventional Commit rules, CI & Release
- Arc42 documentation template with Astro Starlight
- Renovate for automated dependency updates
-
Run the following command to create a new project-name
npx degit https://github.com/froko/dotnet-monorepo <project-name> -
Run
pnpm install -
Change into the project directory and create a first commit with
git init git add . git commit -m "chore: initial commit"
-
Make it yours by changing some information in the following files
README.jsonpackage.json(name, description, author, repository url)docs/astro.config.json(title, social url)docs/src/content/docs/index.mdx(title)
-
Commit your changes
git add . git commit -m "chore: update project information"
-
Create a new .NET projects in either the
appsorlibsdirectory -
Depending on the project type (production, test), copy the appropriate
project-[type].jsonfile to the project directory and rename it toproject.json
pnpm install- Install all dependenciespnpm format- Format all projectspnpm lint- Lint all projectspnpm build- Build all projectspnpm test- Run all testspnpm affected- Lint, Build & Test all affected projectspnpm all- Lint, Build & Test all projects
By default, the pnpm workspace comes with preconfigured directories for apps
and libs. You can add more directories or change the default ones by modifying
the pnpm-workspace.yaml file. Nx will automatically adhere to these changes.