Add file header
This code generation applies to:
What: Add file headers to existing files, projects, and solutions using an EditorConfig.
When: You want to easily add a file header to files, projects, and solutions.
Why: Your team requires you to include a file header for copyright purposes.
Add an EditorConfig to a project or solution if you do not already have one.
Add the following rule to your EditorConfig file: file_header_template.
Set the value of the rule to equal the header text you would like applied.
You cannot have explicit multilines in an EditorConfig and will need to use the Unix newline character to insert new lines.
Place your caret on the first line of any C# or Visual Basic file.
Press Ctrl+. to trigger the Quick Actions and Refactorings menu.
Select Add file header.
To apply the file header to an entire project or solution, select Project or Solution under the Fix all occurrences in: option.
The Fix all occurrences dialog will open where you can preview the changes.
Select Apply to apply the changes.