英文:
No JQuery intellisense in cshtml files in Visual Studio 2022
问题
我目前的设置:
- Visual Studio 2022
- ASP.Net Core 7 MVC
当运行项目时,我可以确认 JQuery 正常工作。任何帮助都将不胜感激。
谢谢。
英文:
After several hours I can't figure out how to get intellisense working when using JQuery in .csthml files. From what i've read on other posts etc. it should be possible.
My current setup:
- Visual Studio 2022
- ASP.Net Core 7 MVC
I can confirm JQuery is working just fine when running the project.
Any help is appreciated.
Thanks.
答案1
得分: 2
这里是来自Microsoft的解决方案,希望它能为您提供一些帮助:
> 从Visual Studio 2022开始,出于性能原因,除非您明确选择,否则我们不再自动分析项目中的所有JavaScript文件。您可以通过在"工具"->"选项"->"文本编辑器"->"JavaScript/TypeScript"->"项目"->"常规"下取消选中"忽略来自VisualStudio项目的源文件",或者将tsconfig.json
/jsconfig.json
文件添加到您的项目中来实现这一点。
请参考此链接。
英文:
Here is a solution from Microsoft, Hope it can give you some help:
> Starting in Visual Studio 2022, for performance reasons, we no longer
> automatically analyze all JavaScript files in your project unless you
> explicitly opt in. You can do this by unchecking “Ignore Source Files
> From VisualStudio Projects” under Tools->Options->Text
> Editor->JavaScript/TypeScript->Project->General, or by adding a
> tsconfig.json
/jsconfig.json
file to your project.
Refer to this link.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论