Why ASP.NET Core 3.1 application installs Angular v8 on it's own?

Nimish Srivastav 1 Reputation point
2021-05-13T21:24:23.767+00:00

Hi,

I have been trying to create a simple CRUD app using Angular v12 (the latest version) and .NET Core 3.1. Whenever I try to create project in VS, it created project with Angular v8. So I installed Angular v12 globally. But still it uses Angular v8 in the project and not taking a Angular version which is globally installed.

I am not able to find the solution for this issue. Any help would be highly appreciated.

Thanks,
Nimish Srivastav

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
697 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,156 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Jerry Cai-MSFT 986 Reputation points
    2021-05-14T03:44:06.227+00:00

    Hi,NimishSrivastav

    Angular version 8 to version 12 needs 10.13 or higher.

    If you are sure that you have installed the v12, have you applied it to your project?

    You can follow the full steps in this link to update your angular in asp.net core:

    update.angular.io

    Best Regards,
    Jerry Cai


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Asjad Butt 71 Reputation points
    2022-09-20T05:59:50.697+00:00

    you can try and create both of the projects separatly on and then inject the api into the angular project of any version it is

    0 comments No comments

  3. Bruce (SqlWork.com) 55,601 Reputation points
    2022-09-20T16:47:00.11+00:00

    the angular template for .net 3.1 has not been updated. the version of angular is based on package.json file in the template

    the easiest way to update a new project:

    go the project root
    delete ClientApp folder
    create new angular project: ng new clientapp
    rename folder clientapp to ClientApp

    .note: as .net 3.1 support ends 12/13/2022, you really should not start new project with it. .net 6 changes how spa projects are developed and tested (uses node proxy rather than .net proxy), so you are better off starting .net 6

    0 comments No comments