Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS 2019 no intellisense and validation after ng cli update to version 10

I've updated my .NET core 3.1+Angular 9.1 to Angular 10.0.2, steps I used:

  1. update Vs TypeScript to 3.9.5
  2. run ng update @angular/core @angular/cli

After that VS 2019 v 16.6.3 shows no intellisense and validation,project runs without problems. If I open the project in VS Code all work fine

I've found the problem is just after I run ng update @angular/cli

reverting project to 9.1 all works fine

thanks

like image 960
mrapi Avatar asked Jul 01 '20 08:07

mrapi


People also ask

How do I fix VS code IntelliSense?

Troubleshooting# If you find IntelliSense has stopped working, the language service may not be running. Try restarting VS Code and this should solve the issue. If you are still missing IntelliSense features after installing a language extension, open an issue in the repository of the language extension.


Video Answer


1 Answers

I experienced the same issue after upgrading a project to Angular 10. It appears to be an issue with the latest version of Visual Studio 2019 not handling the changes to the tsconfig.json file and the introduction tsconfig.base.json.

As a workaround until this is resolved in VS 2019 I copied the contents of tsconfig.base.json up to tsconfig.json and commented out the upgraded config.

I now have and file that looks like this and the old functionality is restored

/*
  This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
  It is not intended to be used to perform a compilation.

  To learn more about this file see: https://angular.io/config/solution-tsconfig.

  removed this as causes vs 2019 to fail - the config details are copied from base so when this is sort we can revert

  "files": [],
  "references": [
    {
      "path": "./src/tsconfig.app.json"
    },
    {
      "path": "./src/tsconfig.spec.json"
    },
    {
      "path": "./src/tsconfig.server.json"
    },
    {
      "path": "./e2e/tsconfig.e2e.json"
    }
  ]

*/
{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "module": "esnext",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017",
      "dom"
    ]
  },
  "angularCompilerOptions": {
    "enableIvy": true
  }
}
like image 90
John Burton Avatar answered Oct 01 '22 11:10

John Burton