Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 Autoformat (CTRL K D) lower case issue with 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

@model IEnumerable<review>

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.

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.

like image 212
Ricardo Deano Avatar asked Feb 13 '14 11:02

Ricardo Deano


1 Answers

Thanks to ta.speot.is on this one.

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

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

like image 95
Ricardo Deano Avatar answered Sep 24 '22 16:09

Ricardo Deano