Visual Studio“格式化整个文档"-- 可以从命令行执行吗? [英] Visual Studio "format the whole document" -- executable from the command line?

查看:21
本文介绍了Visual Studio“格式化整个文档"-- 可以从命令行执行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio 2008 有一个方便的命令格式化整个文档"(ctrl+k,ctrl+d).这将清理和自动缩进许多不同类型的文件,包括 .aspx、.xml 等.

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 并等待文件打开?

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?

推荐答案

我相信答案是否定的.

主要原因是格式化整个文档"会修改文档,但不会保存它.因此,它不是一个破坏性的操作.您不仅可以检查原始文档(您已打开),还可以在执行命令后、覆盖原始文档之前进行视觉验证.

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.

这篇关于Visual Studio“格式化整个文档"-- 可以从命令行执行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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