Visual Studio XML文件编辑器小写 [英] Visual Studio XML File Editor Lowercase

查看:164
本文介绍了Visual Studio XML文件编辑器小写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Visual Studio中编辑cshtml(带有.cshtml文件扩展名).我会自动设置格式或粘贴一些xml(这会触发自动格式),而Visual Studio会小写我所有的xml属性(因此theAttribute> theattribute).

I'm editing cshtml in Visual Studio (with a .cshtml file extension). I auto format or paste in some xml (which triggers an auto format) and Visual Studio lowercases all my xml attributes (so theAttribute > theattribute).

这是错误的.我该如何解决?我在工具">选项"下看不到相关选项.

This is wrong. How can I fix? I don't see a relevant option under Tools > Options.

推荐答案

我还没有找到配置此行为的方法,但是作为解决方法,您可以显式选择要与* .cshtml文件一起使用的编辑器,然后它才能正常工作.

I haven't found a way to configure this behavior, but as workaround you can explicitly select editor to be used with *.cshtml files and then it works properly.

转到工具->选项->文本编辑器->文件扩展名

Go to Tools -> Options -> Text Editor -> File Extension

P.S.看来在单独的节点中已经有HTML(Razor)文本编辑器设置的计划,但是我在VS 2013发行版中没有看到它.请参阅

P.S. It looks like there were plans for HTML (Razor) text editor settings in a separate node, but I don't see it in release of VS 2013. See HTML Editing Features in Visual Studio 2013 Preview

我还看到[工具]-> [选项]-> [文本编辑器]-> [HTML(Web表单)]-> [格式设置]包含一些选项,这些选项专门提及您所获得的行为.

Also I saw that Tools -> Options -> Text Editor -> HTML (Web Forms) -> Formatting has options which specifically mention the behavior you are getting.

这篇关于Visual Studio XML文件编辑器小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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