开发者

Get Visual Studio 2010 to use .cshtml formatting for .html files

开发者 https://www.devze.com 2023-03-06 13:53 出处:网络
We have an ASP.Net MVC 3 project which will also be serving an existing set of .html files.These files do have some \"@\"开发者_运维问答 Razor code inserted in them, however we do not want to change t

We have an ASP.Net MVC 3 project which will also be serving an existing set of .html files. These files do have some "@"开发者_运维问答 Razor code inserted in them, however we do not want to change the extensions.

Is there any way to get VS to use the same code formatting it uses for .cshtml files for these files as well, to make it easier to see the Razor code highlighted in yellow.

TIA

Matt


Check out RazorCodeLanguage.Languages, which lets you set which file extensions use which Razor parser (CS/VB).

0

精彩评论

暂无评论...
验证码 换一张
取 消