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.
To convert text to all lower case, choose Edit > Advanced > Make Lowercase or press Ctrl+U.
To access XML formatting options, choose Tools > Options > Text Editor > XML, and then choose Formatting.
Command Palette: CTRL + SHIFT + p (Mac: CMD + SHIFT + p ) type >transform pick upper/lower case and press enter.
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. 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
Also I saw that Tools -> Options -> Text Editor -> HTML (Web Forms) -> Formatting has options which specifically mention the behavior you are getting.
You may also want to try this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With