When formatting code a Razor cshtml file in Visual Studio 2012 (with Ctrl + K + D) if model is a generic type, VS makes it all lowercase. For example:
@model IEnumerable<Content>
converts to (consider all lower case content):
@model IEnumerable<content>
after formatting. This cause the code not to compile. Is this a bug or I'm missing something? How it can be fixed?
This issue is from Visual Studio 2012 not recognizing it as razor code and treating it as regular HTML. I believe this is a bug with VS 2012 and will hopefully get fixed soon. As a temporary fix, you can do this:
Hope this helps.
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