开发者

Visual Studio "format the whole document" -- executable from the command line?

开发者 https://www.devze.com 2023-01-12 14:11 出处:网络
Visual Studio 2008 has a handy 开发者_运维技巧command \"format the whole document\" (ctrl+k,ctrl+d). This will clean up and auto-indent many different types of files, including .aspx, .xml, etc.

Visual Studio 2008 has a handy 开发者_运维技巧command "format the whole document" (ctrl+k,ctrl+d). This will clean up and auto-indent many different types of files, including .aspx, .xml, etc.

Is it possible to invoke this functionality from the command line, so I don't need to open the Visual Studio and wait for files to open?


I believe the answer is no.

The main reason being that "format the whole document" modifies the document, but does not save it. It is therefore not a destructive operation. Not only do you have the ability to check the original document (which you have open) you can also visually verify after executing the command, but before overwriting the original.

A commandline tool would be destructive with no way to check what was actually changed, it would simply be overwritten.

0

精彩评论

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