Image for post
Image for post
Photo by Arie Wubben on Unsplash

Convert your .NET Core with Angular SPA app to an NX environment — Quick Guide

Interested in joining the big guys by adding NX to your .NET Core Angular App?


With the growing power and fame of the .NET Core framework and Angular some awesome possibilities are blooming.

One of these is .NET Core’s support for Angular.

Just take the .NET Core CLI and the only thing you gotta bang into that keyboard is…

dotnet new angular -o MyNextAwesomeApp

…and BOOM! It generates a simple .NET Core API server as well as an Angular SPA with amazing server-side rendering, auth options, and more.

Hot stuff if you want to know my opinion.

But what if we want to do better? And use NX to manage our Angular app(s)?

I mean, why not? All the other big guys like…

  • American Airlines
  • Microsoft
  • RedHat
  • FedEx
  • Cisco
  • Audi

…and all kinds of other cool kids are using it.

So how do we install and use NX with a .NET Core Angular SPA app?


An ASP.Net Core project with Angular SPA.

Install NX

Assuming that the ASP.NET Core Angular app has already been created the next step is to verify our Angular version.

  • Open your project in a terminal and cd into the ClientApp directory.
  • Type ng --version to check your global Angular version.

With NX you must install the NX version that matches the major version of your global Angular CLI. So head over to package repository and find the version you want. Then type the following command.

  • ng add @nrwl/package@cli.version.number

Fix the imports

The installer tries it’s best to update your angular.json file but I found that it really messed my config up so I had to do some manual editing.

Basically all you should need to do is update the broken imports.

Here’s a fixed angular.json example.


Not bad! Not bad my friend! You’ve made a great choice by installing NX.

Interested in going further? There’s a great demo app here.

Questions or comments? Don’t hesitate to contact me.

Image for post
Image for post

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store