Visual Studio 2013自动套用格式(CTRL K D)cshtml的小写问题 [英] Visual Studio 2013 Autoformat (CTRL K D) lower case issue with cshtml

查看:130
本文介绍了Visual Studio 2013自动套用格式(CTRL K D)cshtml的小写问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近才更新到VS 2013,使用MVC 3应用程序时遇到自动格式化问题,因此使用CTRL K + D快捷方式时,cshtml文件顶部的模型声明设置为小写(或突出显示所有内容,格式选择),例如

I've only recently updated to VS 2013 and when using an MVC 3 app I'm experiencing an auto formatting issue whereby the model declaration at the top of a cshtml file is set to lowercase when using the CTRL K + D shortcut (or highlight all, Format Selection) e.g.

@model IEnumerable<Review>

CTRL K + D

CTRL K + D

@model IEnumerable<review>

VS 2012中的同一项目可以正常工作并且可以自动格式化,因此我尝试导出这些设置并导入它们,但是没有任何运气.

Same project in VS 2012 works perfectly ok and auto formatting works so I tried export those settings and importing them but without any luck.

我尝试在工具"-选项"-文本编辑器"中查找,并将html Web表单中的客户端标签"更改为按输入",但这仍然无效.

I've tried looking in Tools - Options - Text Editor amd changed the Client Tag in html web forms to 'As entered' but that also hasn't worked.

推荐答案

感谢ta.speot.is在这一点上.

Thanks to ta.speot.is on this one.

正如我的问题下面的评论中所述,VS2013不支持MVC3.

As mentioned in the comments below my question, VS2013 doesn't support MVC3.

要解决此问题,请将MVC3更新到MVC4或更高版本,这可以解决自动格式化问题.

To resolve this issue, update MVC3 to MVC4 or later and this resolves the auto-formatting issue.

这篇关于Visual Studio 2013自动套用格式(CTRL K D)cshtml的小写问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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