在Razor中禁用Visual Studio代码格式 [英] Disable Visual Studio code formatting in Razor

查看:132
本文介绍了在Razor中禁用Visual Studio代码格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题之前曾被问过:为什么Visual Studio代码格式不能正确用于Razor标记?

This has been asked before: Why doesn't Visual Studio code formatting work properly for Razor markup?

但是这个问题已经有两年了.而且Razor格式化 still 完全不可接受.我已经放弃了修复它.

But that question is a couple years old. And Razor formatting is still completely unacceptable. I have given up on fixing it.

我可以禁用CSHTML文件的所有Visual Studio格式吗?如果不是,是否可以完全禁用所有Visual Studio格式?我可以使用任何第三方黑客吗?一定有东西!

Can I disable ALL Visual Studio formatting for CSHTML files? If not, can I disable all Visual Studio formatting entirely? Any 3rd party hacks I can use? There's got to be something!

我已升级到2013,格式也很糟糕.

I've upgraded to 2013 and the formatting is just as bad.

:2015年也是令人敬畏的.我真的希望他们能解决这个问题.

: 2015 is god-awful as well. I REALLY wish they would fix this.

:2017年也是令人敬畏的.我真的希望他们能解决这个问题.

: 2017 is god-awful as well. I REALLY wish they would fix this.

:2019年也是令人敬畏的.我真的希望他们能解决这个问题.

: 2019 is god-awful as well. I REALLY wish they would fix this.

推荐答案

您不能.自从第一个.net版本(Visual Studio 2002/2003)以来,它就内置于VS的功能"中.

You cannot. This is built in "feature" of VS since the first .net version (visual studio 2002/2003).

关于格式错误的大量连接报告,但Microsoft完全忽略了它们,或将修复程序推送到下一个版本".您可以在此处.

There are tons of connect report about the formatting bugs, but Microsoft ignores them completly, or pushing the fix to the "next version". You can see an example Microsoft answer here.

您可以在Microsoft团队此处

You can post your own feedback to Microsoft Team here

这篇关于在Razor中禁用Visual Studio代码格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆