If you have MVC2 and MVC3 installed, you should have proper syntax highlighting and you should be able to do CTRL+K, CTRL+D to auto-format. However, I've found that the indentation most of the time gets screwed up, so I'm hoping this will improve in future updates.
Ah well, I usually just format and fix whatever is in the wrong place. It's a slight pain in the ass.. I'm too lazy to create a bugreport for Visual Studio though. ;-)
formatting in visual studio
is there any way to auto-format code in cshtml file? this is probably more of a visual studio problem, but i wondered if this has already been raised?
If you have MVC2 and MVC3 installed, you should have proper syntax highlighting and you should be able to do CTRL+K, CTRL+D to auto-format. However, I've found that the indentation most of the time gets screwed up, so I'm hoping this will improve in future updates.
yep ive got MVC3, but like you the indentation is a bit screwed up. i..e brackets in no way aligned with corresponding code. its always the brackets!
Ah well, I usually just format and fix whatever is in the wrong place. It's a slight pain in the ass.. I'm too lazy to create a bugreport for Visual Studio though. ;-)
is working on a reply...