Visual Studio 2015 不是语法高亮剃刀,也不是 Intellisense [英] Visual Studio 2015 not syntax highlighting razor nor Intellisense

查看:26
本文介绍了Visual Studio 2015 不是语法高亮剃刀,也不是 Intellisense的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 VS2015 RC 中的 Razor 视图没有为 C# 代码显示正确的颜色.我的项目在 VS2013 中运行良好,但在 2015 年不是,并且它没有给我任何关于 C# 代码的智能感知.解决方案构建成功,网站运行良好.

My Razor views in VS2015 RC are not showing the proper coloring for C# code. My project was working fine in VS2013, but it isn't in 2015, and it's not giving me any Intellisense on the C# code. The solution builds and the site runs fine.

我尝试了以下方法无济于事

I tried the following to no avail

  • 禁用所有 Visual Studio 扩展
  • 删除我的.suo文件
  • 删除项目并将其重新添加到解决方案中

我该如何解决这个问题?

How can I fix this?

示例:

推荐答案

我在这个 answer 中找到了另一种方式在没有 devenv.exe/ResetUserData

I've found in this answer another way to fix it without the devenv.exe /ResetUserData

在关闭 Visual Studio 的情况下删除此目录的内容:%LocalAppData%MicrosoftVisualStudioComponentModelCache

Just delete the contents of this directory with Visual Studio closed: %LocalAppData%MicrosoftVisualStudio<visual_studio_version_number>ComponentModelCache

要查找您正在运行的 Visual Studio 版本的版本号,请参阅this列表.请注意,只有主要版本号很重要,次要版本可能并且可能会有所不同.就我而言,我安装了 Visual Studio 2017 Enterprise,因此我查找 15.xx 并在 AppData 文件夹中找到 15.0_9a1c4a06.

To find the version number of the Visual Studio edition your are running please refer this list. Note that only the major number is important, the minor version can and will probably differ. In my case I had Visual Studio 2017 Enterprise installed so I looked for 15.xx and found 15.0_9a1c4a06 inside the AppData folder.

这篇关于Visual Studio 2015 不是语法高亮剃刀,也不是 Intellisense的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆