Intellisense for JavaScript不适用于JavaScript独立文件 [英] Intellisense for JavaScript is not working for JavaScript stand-alone file
问题描述
我正在尝试使用Visual Studio 2017创建并写入JavaScript独立文件。我开始注意到intellisense功能对JavaScript不起作用独立文件,而当我将脚本嵌入到HTML文件中时,intellisense
适用于JavaScript语言。我必须打开哪些设置或配置?
欢迎来到MSDN论坛。
你的VS 2017版本是什么?请转到帮助 - 关于Microsoft Visual Studio以在此处检查和共享它。
我尝试创建一个ASP.Net Web应用程序,添加.html和.js文件并检查JS intellisense,它的工作原理如下:
如果我误解了你的问题,请你分享你的详细步骤来重现这个问题吗?
同时,您可以尝试使用以下步骤,在每个步骤之后重新打开.js文件进行测试:
- 转到工具 - 选项 - 文本编辑器 - JavaScript / TypeScript-语言服务:取消选中"启用新的JavaScript语言服务"选项
- 转到工具 - 选项 - 文本编辑器 - JavaScript / TypeScript:取消选中并选中"自动列表成员"和"参数信息"选项
- 转到工具导入和导出设置... - 重置所有设置并备份当前设置,选择'常规'恢复设置
- 以管理员身份运行VS 2017安装程序,使用更多修复来修复VS
最好的问候,
萨拉跨度>
Hi,
I am trying to create and write into a JavaScript standalone file using Visual Studio 2017. I am beginning to notice that the intellisense feature does not work for JavaScript standalone file, whereas when I embed the script into a HTML file, the intellisense works for the JavaScript language. What settings or configuration must I turn on ?
Hi cally,
Welcome to the MSDN forum.
What is your VS 2017 version? Please go to Help-About Microsoft Visual Studio to check and share it in here.
I tried to create an ASP.Net web application, add an .html and .js files and check the JS intellisense, it works as below:
Could you please share your detail steps to reproduce this issue, in case I misunderstand your issue?
Meanwhile, you can have a try with the following steps, after each step and reopen the .js file to test:
- Go to Tools-Options-Text Editor-JavaScript/TypeScript-Language Service: uncheck the option "Enable the new JavaScript language service"
- Go to Tools-Options-Text Editor-JavaScript/TypeScript: uncheck and check the options "Auto list members" and "Parameter information"
- Go to Tools-Import and Export Settings…-Reset all settings and backup the current setting, choose ‘General’ to restore the settings
- Run the VS 2017 installer as administrator and More-Repair to repair your VS
Best regards,
Sara
这篇关于Intellisense for JavaScript不适用于JavaScript独立文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!