Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
904 views
in Technique[技术] by (71.8m points)

visual studio 2017 - 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:WorkBlackhawk PlatformPlatform-DEV-BranchBlackhawkViewerBlackhawkViewer.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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...