Ricardo Deano
Ricardo Deano

Reputation: 2819

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.

Upvotes: 6

Views: 2921

Answers (1)

Ricardo Deano
Ricardo Deano

Reputation: 2819

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.

Upvotes: 2

Related Questions