Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Turning off "Language Service Disabled" error message in VS2017

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?

like image 371
TResponse Avatar asked Mar 24 '17 02:03

TResponse


2 Answers

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

like image 115
Moustafa Mansour Avatar answered Sep 22 '22 06:09

Moustafa Mansour


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.

like image 30
oneNiceFriend Avatar answered Sep 20 '22 06:09

oneNiceFriend