visual-studio-2017error-messaging

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?


Solution

  • To solve this issue do the following:

    {
      "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