Using file headers for copyright notices and other identifying messages is a common practice. ReSharper provides a handy way to insert a common file header into code files in your solution in batch mode.
To configure a file header and insert it into code files
- Choose ReSharper | Options | Languages | Common | File Header Text.
- In the File Header Text area, insert an arbitrary text that you want to insert into your code files.
- Optionally, to surround the file header with a region, enter the name of the region in the Embrace File Header into Region with Name field.
- Choose Tools | Code Cleanup in the ReSharper Options dialog box.
- Create a new profile as described in
Creating Custom Profiles . In the Selected profile settings for the new profile, select Update file header. - Click OK to save the new profile and close the ReSharper Options dialog box.
- Open the Code Cleanup dialog box from the text editor or Solution Explorer as described in
Running Code Cleanup . Note that triggering Code Cleanup upon a selection prevents ReSharper from inserting the file header. - When the Code Cleanup dialog box opens, select the newly created profile in the Available Profiles area.
- Click Run to perform Code Cleanup. ReSharper will update all affected files with the file header.
