0

I am new to Angular CLI. My background is in C# ASP.NET. I recently spun up a ASP.NET Core app with Angular CLI through the project wizard of Visual Studio. All that I needed to do to get things working on http://localhost:4200 was to run npm install @angular/cli and then ng serve and I was good to go.

To get the latest stable release of Angular, I then ran ng update

Now, ng serve returns the error "The serve command requires to be run in an Angular project, but a project definition could not be found."

Also, one other observation is that the $schema reference to schema.json from the .angular-cli.json file is no longer available in the path "./node_modules/@angular/cli/lib/config/schema.json". The config folder is completely missing and I've read that it the config folder was eliminated in a previous version.

My question, is how do i change my .angular-cli.json or other project files to conform to the new standard?

Below is a screenshot of my current versions.

C:\Users\andrew.kirby\source\repos\SchoolsList\SchoolsList\ClientApp>ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 7.3.8
Node: 10.9.0
OS: win32 x64
Angular: 7.2.14
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.13.8
@angular-devkit/core         7.3.8
@angular-devkit/schematics   7.3.8
@angular/cli                 7.3.8
@schematics/angular          7.3.8
@schematics/update           0.13.8
rxjs                         6.5.1
typescript                   3.2.4
AKirby50
  • 174
  • 1
  • 13
  • 1
    Usually, running `ng update @angular/cli` on the project again will convert the *angular-cli.json* to an *angular.json*. At least, that has been my experience. – R. Richards May 02 '19 at 01:15
  • I think that Visual Studio may put a lock on the angular-cli.json. I closed VS and then ran the update command. it deleted the angular-cli.json and added angular.json. – AKirby50 May 02 '19 at 13:32
  • Can you show me the startup.cs code ? – Tony Ngo May 13 '19 at 13:51

0 Answers0