在Visual Studio 2019中,如何删除未使用的格式化文件? [英] In Visual Studio 2019 how can I remove unused usings on format document?

查看:412
本文介绍了在Visual Studio 2019中,如何删除未使用的格式化文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Visual Studio 2019中,如何删除未使用的格式化文档?

In Visual Studio 2019 how can I remove unused usings on format document?

我找到了有关Visual Studio早期版本的说明(转到工具>选项>文本编辑器> C#>代码样式>格式.).我没有在Visual Studio 2019中看到它.

I have found instructions for previous versions of Visual Studio (Go to Tools > Options > Text Editor > C# > Code Style > Formatting.). I don't see that in Visual Studio 2019.

推荐答案

在Visual Studio 2019中,您可以使用代码清除命令删除未使用的用法:

In Visual Studio 2019 you can remove unused usings with the Code Cleanup command:

运行代码清理还会格式化文档.

And running code cleanup also formats the document.

这篇关于在Visual Studio 2019中,如何删除未使用的格式化文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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