Turning off “Language Service Disabled” error message in VS2017

后端 未结 9 1605
故里飘歌
故里飘歌 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:27

    I solved this problem with following solution:

    When you have a JavaScript file that is included in the project.csproj file but isn't in the project folder, this error occurred.

    For example I have a .csproj file like below:

     <ItemGroup>
         <Content Include="Scripts\Test.js" />
     </ItemGroup>
    

    The Test.js is included in the .csproj file, but it isn't in the Scripts folder:

    Delete the <Content Include="Scripts\Test.js" /> line from the .csproj file and rebuild your project

    0 讨论(0)
  • 2020-12-14 06:28

    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"
        ]
    }
    
    0 讨论(0)
  • 2020-12-14 06:33

    I have found a solution for this problem.

    I reset my userData using:

    devenv.exe /resetuserdata

    Since doing this the JavaScript settings seem to have persisted and I no longer get the language service error above.

    TAKE NOTE: This will reset all your user data and customisations.

    0 讨论(0)
  • 2020-12-14 06:37

    If none of suggested methods worked, try:

    npm install -g typescript@latest
    

    and then

    Install the lastest version of TypeScript for Visual Studio on Get TypeScript.

    Hope this helps...

    0 讨论(0)
  • 2020-12-14 06:39

    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
    0 讨论(0)
  • 2020-12-14 06:41

    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": []
    }
    
    0 讨论(0)
提交回复
热议问题