question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support formatting .cshtml and .razor files

See original GitHub issue

I 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:open
  • Created 4 years ago
  • Reactions:23
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
JoeRobichcommented, May 24, 2019

@mort3za Sorry but dotnet-format does not currently work with razor files. We would like to support razor scenarios in the future.

1reaction
NTaylorMullencommented, Oct 23, 2020

/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 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found