2015年项目中MVC 5 Razor视图中的VS 2017 IDE交互性降低 [英] Reduced VS 2017 IDE interactivity in MVC 5 Razor views in 2015 project

查看:85
本文介绍了2015年项目中MVC 5 Razor视图中的VS 2017 IDE交互性降低的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了VS 2017,正在打开一个在VS 2015中创建的MVC 5项目.该应用程序运行良好,但我的MVC Razor视图代码与2017 IDE之间的交互性降低了.

I just installed VS 2017 and am opening an MVC 5 project created in VS 2015. The application runs fine, but I am experiencing reduced interactivity between my MVC Razor view code and the 2017 IDE.

当我右键单击VS 2015中的HTML帮助器方法时,这是上下文菜单:

Here's is the context menu when I right-click on an HTML helper method in VS 2015:

但是,我只在2017年看到这一点:

However, I only see this in 2017:

还请注意2017版本中缺少语法颜色编码.就像根本不识别Razor语法一样.

Also notice the lack of syntax color-coding in the 2017 verison. It's like it's not recognizing Razor syntax at all.

我没有进行任何特殊的解决方案/项目升级.我刚刚在2017年打开了该解决方案,并希望它能提示我升级所有需要升级的文件.

I did not do any special solution/project upgrades. I just opened the solution in 2017 and expected it to prompt me to upgrade any files that needed upgrading.

推荐答案

因此,事实证明VS 2017的组件安装是模块化的,因此您必须完全安装所需的组件.这与2015年(至少我记得)不同,后者安装了所有组件.

So it turns out that the component installation for VS 2017 is modular in that you have to install exactly what you need. This is different from 2015 (at least as far as I recall) where all components are included with the installation.

我倾向于不阅读整页,而只关注似乎是最全面"的选项.就我而言,我只选择了 Universal Windows Platform开发(这听起来不像您需要的一切吗?).如果我不愿看所有组件,就会发现 ASP.NET和Web开发.

I have a tendency not to read entire pages and just focus on what seems like the "most comprehensive" option. In my case, I selected only Universal Windows Platform development (doesn't that just sound like everything you'd need?). If I bothered to look at all the components, I would have seen ASP.NET and web development.

因此,在修改安装后,我现在在视图中看到了所有Razor语法.

So, after modifying my installation, I am now seeing all the Razor syntax in my views.

这篇关于2015年项目中MVC 5 Razor视图中的VS 2017 IDE交互性降低的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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