Adding the GPL license to C# Projects

RodgerB picture RodgerB · Sep 30, 2008 · Viewed 16.6k times · Source

What files do I need to put the header comment in for adding GPL to a C# project?

Does form generated code require it?

Does just need to be in every *.cs file?

Is there a resource or in-depth list of language-specific steps required to add GPL to any kind of project?

Answer

David Schmitt picture David Schmitt · Sep 30, 2008

The canonical answer is in the GPL Howto:

Whichever license you plan to use, the process involves adding two elements to each source file of your program: a copyright notice (such as “Copyright 1999 Terry Jones”), and a statement of copying permission, saying that the program is distributed under the terms of the GNU General Public License (or the Lesser GPL).

The recommended header for applying the GPL is:

Copyright 200X My Name

This file is part of Foobar.

Foobar is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Foobar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Foobar. If not, see http://www.gnu.org/licenses/.

Yes, it SHOULD be added to every file, since you cannot legally depend upon the assumption that every recipient receives your work as a whole. And, no, it doesn't have to be the complete license text.