Turning off “Language Service Disabled” error mess

2020-02-08 06:50发布

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

The language service is disabled for project 'C:\Work\Blackhawk Platform\Platform-DEV-Branch\BlackhawkViewer\BlackhawkViewer.csproj' because it included a large number of .js files. Consider excluding files using the 'exclude' section of a 'tsconfig.json' file.

I have tried turning off the Language service in the options but this does not turn the message off:

enter image description here

This is a rather large web application. Is there a way to turn this message off without disabling any files in the tsconfig.json file as it suggests?

9条回答
【Aperson】
2楼-- · 2020-02-08 07:17

In My case I just disable TypeScript support on Visual Studio:

Tools > Extensions and Updates > TypeScript for Microsoft Visual Studio > Disable

After that, just restart Visual Studio, and you are good to go.

Hope this will help,

查看更多
够拽才男人
3楼-- · 2020-02-08 07:24

Solution that worked for me:

  1. Go to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE>.
  2. Open command prompt as admin in current folder
  3. Ran devenv /Setup
  4. Ran devenv /ResetSkipPkgs
查看更多
Summer. ? 凉城
4楼-- · 2020-02-08 07:24

For me is helping the next solution. I've create a tsconfig.json file in root of the my project with "disableSizeLimit": "true" option.

So, my tsconfig.json file is:

{
  "compilerOptions": {
  "disableSizeLimit": "true"
},
"exclude": []
}
查看更多
淡お忘
5楼-- · 2020-02-08 07:26

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

查看更多
我欲成王,谁敢阻挡
6楼-- · 2020-02-08 07:29

This helped me. You can have a try.

 Go to Tools -> Options -> Text Editor -> JavaScript/TypeScript -> Language Service -> General

and uncheck the box: "Enable the new JavaScript language service.

查看更多
Animai°情兽
7楼-- · 2020-02-08 07:31

I had the same problem after migrating Ionic 1 project from VS2015 to VS2017, first I executed git clean -fxd as sugested above and added this content into tsconfig.json in my ionic project.

{
"compilerOptions": {
    "noImplicitAny": false,
    "noEmitOnError": true,
    "removeComments": false,
    "sourceMap": true,
    "target": "es5"
},
"exclude": [
    "node_modules",
    "www",
    "bower_components"
    ]
}
查看更多
登录 后发表回答