Updating the .NET Core Angular template from Angular 8 to 10

January 14, 2021

Creating a new .NET Core project with the Angular template is pretty handy, but it starts you out on Angular 8. The upgrade process to version 10 is not very straightforward and can cause some serious headaches if you're not sure what to look out for. Thankfully, I recently completed this process and wanted to share the steps I took to perform a successful upgrade.

Image for post

Note: a lot of these steps can be found on Angular's Update Guide here: https://update.angular.io/

All of the following commands should be run from <project-directory>/ClientApp

  1. Update the current version of Angular 8

    • ng update @angular/core@8 @angular/cli@8
  2. Upgrade to version 9

  3. Upgrade to version 10

    • ng update @angular/cli @angular/core rxjs
  4. Upgrade dependencies

    • npm install -g npm-check-updates

      • This package will help upgrade all dependencies to their latest version
    • ncu -u

    • npm install

    • npm update

    • npm audit fix

Voila! You are now running your .NET Core Angular project in version 10. Again, these are just the specific steps for going from version 8 to 10. To upgrade to other versions, check out AngularΓÇÖs Update Guide at https://update.angular.io/


Profile picture

Written by Adam Swanson, hailing from Indiana, who designs, builds, and delivers software. You know, the cool stuff. You should follow him on X.