Tuesday, June 21, 2011

Automated License Header Extension for Visual Studio (define the license once, let VS auto-magically add it to new files...)

Visual Studio Gallery - License Header Manager for Visual Studio

New files will automatically include the license headers defined in the current project.
License Header Manager allows you to:

  • Define license headers per Visual Studio project and per file extension
  • Share license headers between projects via "Add as Link"
  • Add, remove and replace headers at any time for one or all files
  • Put your license headers in #regions



CodePlex - License Header Manager for Visual Studio - License Header Definitions


The actual license headers are defined in .licenseheader files. You can add such a file to you project by right-clicking on the project in the solution explorer and selecting Add New License Header Definition File To Project in the License Headers sub menu. You can also add an existing file which can be useful if you want to share your license header definitions between projects.

The structure of the file is quite simple:

It starts with the keyword extensions: followed by a list of file extensions (separated by whitespaces). Everything below this line until the next line starting with extensions: will be inserted into the files with the given extensions.


I dig that;

a) Source is available

b) You can define the header project by project

c) The license header settings can be checked into source control and also easily shared

No comments: