Turning off “Language Service Disabled” error message in VS2017

后端 未结 9 1608
故里飘歌
故里飘歌 2020-12-14 05:53

We are getting the following \"Error\" message in our MVC web application in Visual studio 2017 Enterprise.

The language service is disabled for proje

9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-14 06:49

    To solve this issue do the following:

    • Create file in root directory of your project and call it tsconfig.json
    • Add this:
    {
      "compilerOptions": {
        "allowJs": true, 
        "noEmit": true, 
        "module": "system",
        "noImplicitAny": true,
        "removeComments": true,
        "preserveConstEnums": true,
        "sourceMap": true
      },
      "include": [
        "scripts"
      ],
      "exclude": [
    
      ],
      "typeAcquisition": {
        "enable": true 
      }
    }
    

    Please have a look at the below two links for tsconfig.json explanation, because you may still need to change it according to your setup. This is the only way that worked for me. I hope that will help.
    https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
    https://developercommunity.visualstudio.com/content/problem/8148/javascript-intellisense-not-working.html

提交回复
热议问题