Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
代码清理选项在 .Designer 文件中不可用。有没有启用此功能的选项?
从ReSharper > Options > Code Inspection > Generated Code的Generated file mask区域中删除 *.Designer.cs 和/或 *Designer.vb 选项。
不过,清理它们时要小心,因为在某些情况下,这样做可能会使代码无法编译。
为什么需要这个,您经常使用 .designer 文件检查代码?我相信主要原因是每次您进行更改并保存控件、页面等时都会重新生成这些文件。