Hi @MD Tarikul Islam ,
Yes, you can use Asp.net core 3.1 with angular 11.
You could refer the following steps to create a Asp.net core 3.1 application with Angular 11.
- Create a new Asp.net Core 3.1 application and use the Angular template:
- Update the Angular version to Angular 11. In the ClientApp folder, delete the
package-lock.json
file, then, open thepackage.json
file, you can see it using Angular 8 version, change the dependencies as below:"dependencies": { "@angular/animations": "~11.0.6", "@angular/common": "~11.0.6", "@angular/compiler": "~11.0.6", "@angular/core": "~11.0.6", "@angular/forms": "~11.0.6", "@angular/platform-browser": "~11.0.6", "@angular/platform-browser-dynamic": "~11.0.6", "@angular/platform-server": "~11.0.6", "@angular/router": "~11.0.6", "@nguniversal/module-map-ngfactory-loader": "8.2.6", "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.6.0", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "0.1100.6", "@angular/cli": "11.0.6", "@angular/compiler-cli": "~11.0.6", "@angular/language-service": "~11.0.6", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "2.0.8", "@types/node": "^12.11.1", "codelyzer": "^6.0.0", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.1.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.0.3", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", "typescript": "~4.0.2" }, "optionalDependencies": { "protractor": "~7.0.0", "ts-node": "~8.3.0", "tslint": "~6.1.0" }
Then, build your application and running it, the output as below:
[Note] You might meet the "The Angular CLI process did not start listening for requests within the timeout period of 0 seconds." error, if meet this error, try to clean the project first, then, running the application. And you could also check this thread: TimeoutException: The Angular CLI process did not start listening for requests within the timeout period of 0 seconds