Jack
Jack

Reputation: 1

Why Angular creates project with lower version than the installed version?

I have the following version information installed on my PC:

$ ng --version

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1001.1
@angular-devkit/core         10.1.1
@angular-devkit/schematics   10.1.1
@schematics/angular          10.1.1
@schematics/update           0.1001.1
rxjs                         6.6.2

However, although I have Angular 10 installed, when creating a new project via VS Code using the following command, my project version does not seems to be the latest version as on my PC:

dotnet new angular
dotnet dev-certs https --trust
cd ClientApp
npm install

But in the dependencies, it seems to be @angular/core": "8.2.12" (or maybe it means 8+ that means backward compatible, but I could not be sure):

"dependencies": {
    "@angular/animations": "8.2.12",
    "@angular/common": "8.2.12",
    "@angular/compiler": "8.2.12",
    "@angular/core": "8.2.12",
    "@angular/forms": "8.2.12",
    "@angular/platform-browser": "8.2.12",
    "@angular/platform-browser-dynamic": "8.2.12",
    "@angular/platform-server": "8.2.12",
    "@angular/router": "8.2.12",
    "@nguniversal/module-map-ngfactory-loader": "8.1.1",
    "aspnet-prerendering": "^3.0.1",
    "bootstrap": "^4.3.1",
    "core-js": "^3.3.3",
    "jquery": "3.4.1",
    "oidc-client": "^1.9.1",
    "popper.js": "^1.16.0",
    "rxjs": "^6.5.3",
    "zone.js": "0.9.1"
},

So, what is the reason for that and what it means? And why are they different? Do I have to upgrade project manually even if I use the latest Angular version while creating an Angular project?

Upvotes: 0

Views: 107

Answers (1)

Aian
Aian

Reputation: 234

If you will run ng new my-app will create project with last version that you have , but in your case the issue is related with configuration of dotnet , unfortunately I'm not familiar with Dotnet but you could check your configuration

Upvotes: 2

Related Questions