I have a file with custom extension which contains Razor Syntax. I would like open this file as cshtml
to see highlighted Razor Syntax.
Tools->Options->Text Editor->File Extension
with my custom extension?
I've already tried all editors from the combobox but without success.
When I change the extension to cshtml
then Razor Syntax is highlighted.
Unfortunately it looks like this may not be possible - see this question.
Personally, I'm using the RazorEngine to generate HTML emails and all my templates use .cshtml extensions for this very reason. I don't have any particular reason to change it.