【问题标题】:Adding GNU GPL Licence to C# App [closed]将 GNU GPL 许可证添加到 C# 应用程序 [关闭]
【发布时间】:2010-12-01 23:52:47
【问题描述】:

我知道如何做到这一点,但我不知道 StyleCop 方法是否正确/有效。通常在 StyleCop 规则中,您必须将这个示例添加到标题中(需要编辑):

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

还有用于 ReSharper 的 StyleCop:

// --------------------------------------------------------------------------------------------------------------------
// <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 方法能奏效。也许我应该将“{one line to give the program's name and a brief idea of​​ what it does.}”移到版权标签的上方。 谢谢。

【问题讨论】:

  • 我投票结束这个问题,因为它是题外话,因为它是关于许可或法律问题,而不是编程或软件开发。 See here 了解详情,help center 了解更多信息。

标签: c# licensing gpl gnu stylecop


【解决方案1】:

有一个how-to 将许可证应用于源代码。

这将是利用代码区域的好机会:

#region Copyright
// your copyright goes here
#endregion

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

另外,创建一个snippet,这样您就不必记住了。

【讨论】:

    【解决方案2】:

    我觉得不错。您是否阅读过 GPL 常见问题解答,其中有一整节是关于为您的程序使用 GNU 许可证。也许你可以在那里仔细检查一下。

    【讨论】:

      猜你喜欢
      • 2011-08-10
      • 1970-01-01
      • 1970-01-01
      • 2023-03-20
      • 2010-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多