在Visual Studio 2022的cshtml文件中没有JQuery智能感知。

huangapple go评论46阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年2月19日 23:56:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/75501404.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定