How to Cleanup .Designer files using ReSharper?

724 Views Asked by At

Code Cleanup option isn't available in .Designer files. Is there any option to enable this feature?

2

There are 2 best solutions below

4
On BEST ANSWER

Remove the *.Designer.cs and/or *Designer.vb option from the Generated file masks area in ReSharper > Options > Code Inspection > Generated Code.

Be careful with cleaning them up, though, as in some cases doing so might render the code uncompilable.

0
On

Why do you need this, you are often examining code withing .designer files? I believe the main reason is the fact that these file are regenerated every time you make change and save the control, page etc.