VS 不会给我的代码着色,智能感知将不起作用,并且转到定义和其他函数将不起作用
我无法提供任何代码,因为我处于 NDA 之下,但正如标题所示,VS 不会对我的代码进行着色,也不会让我使用它拥有的任何内置工具。它允许我重建等等,但不能直接编辑或显示任何文件。 Google 对这个问题绝对一无所知,一切总是 VS Code。它只适用于一个特定的项目,这使得工作非常困难,有人知道解决方案吗?有人听说过这个问题吗?
这是 Visual Studio 2022。
编辑: 该代码采用 TypeScript 编写,文件扩展名为 .ts
(如果这不是很明显的话),更不用说它甚至不与纯 HTML 交互。唯一一次它甚至为文本着色是当我重新启动 VS 时,然后它回到完全不与文本交互,直到我再次重新启动,然后它只突出显示其中 2 个文件并再次停止。这是我从我的角度所能提供的最多信息,如果您需要更多信息,请询问。
I can't provide any code because I'm under NDA, but as the title says, VS won't color my code or let me use any of the built-in tools it has. It allows me to rebuild and such, just not anything that directly edits or reveals any files. Google has absolutely nothing about the problem, everything is always VS Code. It's only for one specific project and it makes it very hard to work, does anyone know a solution? Has anyone ever heard of this problem?
It's Visual Studio 2022.
Edit:
The code is in TypeScript, with the .ts
file extension, if that wasn't obvious, not to mention that it doesn't even interact with plain HTML. The only time it even colors the text is when I restart VS, then it goes back to not interacting with the text at all until I restart again, then it only highlights 2 of the files and stops again. This is the most information I could possibly give from my perspective, ask for any more you need.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通常可以通过简单地关闭 VS 然后重新打开它来解决这个问题。这绝对是 Visual Studio 中 Typescript 和 Javascript 文件的一个故障。如果关闭/重新打开太烦人了,这篇文章中还可以尝试其他一些方法:
Visual Studio 2022 - 对于打字稿文件 Intellisense 不起作用
I can usually fix this by simply closing VS and then reopening it. It's definitely a glitch in Visual Studio with both Typescript and Javascript files. If closing/reopening gets too annoying, there's some other things to try on this post:
Visual Studio 2022 - for typescript files Intellisense not working