Support formatting .cshtml and .razor files
See original GitHub issueI just tried
dotnet-format --files Home/Home.cshtml
on my razor template but seems it does not read it at all.
(But tried on other filetypes and works great).
Is razor templates supported?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:23
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Formatting Razor Files in Visual Studio Code
Anyone have a good solution for formatting Razor files inside of VSCode? I've tried making it work with prettify-vscode and beautify. But in ......
Read more >Razor (cshtml) bad automatic formatting - @helper tag ...
When I use Format document to format .cshtml and it already formats little bit badly already. But the biggest problem is that when...
Read more >How to format razor pages in blazor in visual studio 2022
1 answer. To format the code in the VS 2022, you can try to use the following methods: Format Entire Document. Menu: Edit...
Read more >Formatting of Razor-files : r/VisualStudio
Am I crazy or is there just no way I can get my Razor files formatted properly in VS2022 without doing it myself,...
Read more >CSHTML - ASP.NET Razor Webpage - File Format Docs
CSHTML files are text files that follow the syntax outlined by Razor markup engine. Razor supports both C# and VB.NET, and it is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mort3za Sorry but dotnet-format does not currently work with razor files. We would like to support razor scenarios in the future.
/cc @ajaybhargavb for curiosities sake. It’d be a suppper hard problem to do right if we’re taking into account things like TagHelpers/Components 😄