Adding GNU GPL Licence to C# App [closed]

試著忘記壹切 提交于 2019-12-09 20:14:04

问题


I know how to do this but I don't know is the StyleCop method true/working. Normally in StyleCop rules you must add this thing like this example to header (need to edit):

//-----------------------------------------------------------------------
// <copyright file="Widget.cs" company="Sprocket Enterprises">
//     Copyright (c) Sprocket Enterprises. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

And with StyleCop for ReSharper:

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Form1.cs" company="">
//   
// </copyright>
// <summary>
//   Defines the Form1 type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

My final header is:

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Form1.cs" company="{Company}">
//
// Copyright (C) 2009 {Company}
//
// This program 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.
//
// This program 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 this program.  If not, see http://www.gnu.org/licenses/. 
// </copyright>
// <summary>
// {one line to give the program's name and a brief idea of what it does.}
// 
// Email: {Email}
// XFire and Steam: {Username}
// </summary>
// --------------------------------------------------------------------------------------------------------------------

If I add this header to all my sources and share, will my application be GPL licenced? If not, where's the problem? I hope the StyleCop method will work. Maybe I should move "{one line to give the program's name and a brief idea of what it does.}" to upper than Copyright tag. Thanks.


回答1:


Looks good to me. Have you read the GPL FAQ, there is a whole section on Using GNU licenses for your programs. Maybe you could double check there.

  • GNU General Public License
  • GPL FAQ



回答2:


There's a how-to apply the license to source code.

This would be a good chance to make use of code regions:

#region Copyright
// your copyright goes here
#endregion

That way developers can collapse all the fluff :-)

Also, create a snippet so you don't have to remember.



来源:https://stackoverflow.com/questions/1486894/adding-gnu-gpl-licence-to-c-sharp-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!