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

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
  }
}

I had the exact same problem after I migrated from Angular 9 to Angular 10.

I found the following worked for me:

TL;DR

In all the 'project' level tsconfig files (tsconfig.app.json, tsconfig.spec.json, tsconfig.e2e.json) just change the 'extends' property from:

{
   "extends": "../tsconfig.json"
   ...
}

To the following:

{
   "extends": "../tsconfig.base.json"
   ...
}

Full Version

Before running ng update I had the following structure:

ClientApp
|_ tsconfig.json
|_ src
   |_ tsconfig.app.json
   |_ tsconfig.spec.json
|_ e2e
   |_ tsconfig.e2e.json

After running ng update I had the following structure:

ClientApp
|_ tsconfig.json
|_ tsconfig.base.json
|_ src
   |_ tsconfig.app.json
   |_ tsconfig.spec.json
|_ e2e
   |_ tsconfig.e2e.json

After reading the Angular migration notes I noticed my version of tsconfig.json and tsconfig.base.json were identical. This still worked but it didn't match what Angular were describing in the notes. So I decided to change my `tsconfig.json. manually to the following:

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

And like everyone else it broke my app.

So I had a look at the 'project' level tsconfig files and noticed the 'extends' property was still point to tsconfig.json and not to tsconfig.base.json. After updating my 'project' level tsconfig files to pointing to the tsconfig.base.json file everything just worked.

Happy days!

:-)

I am guessing the ng update should "automagically" find and update all the 'project' level tsconfig files but it looks like it doesn't. The fix however is fairly straight forward though.


Update

Although changing extends property did resolve my compilation issues. When I closed and reopened Visual Studio the next day the IntelliSense started to fail.

Only by making the tsconfig.json to be the same as the tsconfig.base.json could I get both the compilation and IntelliSense working.


Update

This seems to be working in visual studio 16.7.1


I faced the same issue when updated to angular 10. It seems to be a known issue and the fix is already available in the preview.

Until the fix is available to the public, following changes in tsconfig.json resolve the issue for me.

{
  "extends": "./tsconfig.base.json"
}