-->

添加GNU GPL授权到C#程式[关闭](Adding GNU GPL Licence to C#

2019-08-16 23:07发布

我知道如何做到这一点,但我不知道是该方法StyleCop的真/工作。 通常情况下在了StyleCop规则,你必须添加这个东西像这样的例子头(需要编辑):

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

并用了StyleCop ReSharper的:

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

我最后的标题是:

// --------------------------------------------------------------------------------------------------------------------
// <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>
// --------------------------------------------------------------------------------------------------------------------

如果我加入这个头我所有的来源和份额,将我的申请被GPL许可? 如果没有,哪来的什么问题? 我希望了StyleCop方法会奏效。 也许我应该搬到“{一行描述程序的名称和它用来做什么的简单说明。}”比版权标签上。 谢谢。

Answer 1:

在我看来很好。 您已经阅读GPL常见问题解答,对使用GNU许可证的程序一整节。 也许你可以仔细检查那里。

  • GNU通用公共许可证
  • GPL常见问题解答


Answer 2:

有一个如何对许可证应用到源代码。

这将是一个很好的机会,利用代码的区域:

#region Copyright
// your copyright goes here
#endregion

这样,开发人员可以折叠所有的绒毛:-)

此外,创建一个片段 ,这样你就不必记住。



文章来源: Adding GNU GPL Licence to C# App [closed]