Chris
Chris

Reputation: 6072

Exclude files from solution-wide Code Cleanup in Resharper

Is there a way to exclude certain files from Resharper's Code Cleanup? I have a range of generated files I'd like to leave untouched.

I found the below question, however the answer's there are workaround's for the specific issue, and don't answer how to actually exclude files. (If it's possible)

Is there a resharper comment directive to disable code cleanup for a class?

Upvotes: 16

Views: 3278

Answers (1)

meh-uk
meh-uk

Reputation: 2151

If you go to ReSharper Options > Generated Code and add your file to the list of Generated Code or Generated File masks then it will be skipped by the Code Cleanup process.

Picture of the relevant pane of the ReSharper options

Upvotes: 26

Related Questions