开源协议 比较说明_开源.NET库作者的新说明性指南

开源协议 比较说明

开源协议 比较说明

There's a great new bunch of guidance just published representing Best Practices for creating .NET Libraries. Best of all, it was shepherded by JSON.NET's James Newton-King. Who better to help explain the best way to build and publish a .NET library than the author of the world's most popular open source .NET library?

刚刚发布了许多新的指南,它们代表创建.NET库的最佳实践。 最棒的是,它由JSON.NET的James Newton-King负责。 有谁比世界上最受欢迎的开源.NET库的作者更好地帮助解释构建和发布.NET库的最佳方法?

Perhaps you've got an open source (OSS) .NET Library on your GitHub, GitLab, or Bitbucket. Go check out the open-source library guidance.

也许您在GitHub,GitLab或Bitbucket上有一个开源(OSS).NET库。 去查看开源库指南

These are the identified aspects of high-quality open-source .NET libraries:

这些是高质量的开源.NET库的已识别方面:

  • Inclusive - Good .NET libraries strive to support many platforms and applications.

    包容性-好的.NET库努力支持许多平台和应用程序。

  • Stable - Good .NET libraries coexist in the .NET ecosystem, running in applications built with many libraries.

    稳定-好的.NET库共存于.NET生态系统中,并在由许多库构建的应用程序中运行。

  • Designed to evolve - .NET libraries should improve and evolve over time, while supporting existing users.

    专为发展而设计-.NET库应随着时间的推移而改进和发展,同时支持现有用户。

  • Debuggable - .NET libraries should use the latest tools to create a great debugging experience for users.

    可调试-.NET库应使用最新工具为用户创建出色的调试体验。

  • Trusted - .NET libraries have developers' trust by publishing to NuGet using security best practices.

    可信-.NET库通过使用安全性最佳实践发布到NuGet来获得开发人员的信任。

The guidance is deep but also preliminary. As with all Microsoft Documentation these days it's open source in Markdown and on GitHub. If you've got suggestions or thoughts, share them! Be sure to sound off in the Feedback Section at the bottom of the guidance. James and the Team will be actively incorporating your thoughts.

指导既深入又初步。 与所有Microsoft文档一样,这些文档在Markdown和GitHub上都是开源的。 如果您有建议或想法,请与他人分享! 确保在指南底部的“反馈”部分关闭声音。 詹姆斯和团队将积极吸收您的想法。

跨平台定位 (Cross-platform targeting)

Since the whole point of .NET Core and the .NET Standard is reuse, this section covers how and why to make reusable code but also how to access platform-specific APIs when needed with multi-targeting.

由于.NET Core和.NET Standard的重点是重用,因此本节介绍如何以及为何制作可重用的代码,以及如何在需要多目标时访问特定于平台的API。

强大的命名 (Strong naming)

Strong naming seemed like a good idea but you should know WHY and WHEN to strong name. It all depends on your use case! Are you publishing internally or publically? What are your dependencies and who depends on you?

强命名似乎是个好主意,但您应该知道强名称的含义和含义。 这完全取决于您的用例! 您是内部发布还是公开发布? 您的依赖项是什么?谁依赖您?

NuGet (NuGet)

When publishing on the NuGet public repository (or your own private/internal one) what do you need to know about SemVer 2.0.0? What about pre-release packages? Should you embed PDBs for easier debugging? Consider things like Dependencies, SourceLink, how and where to Publish and how Versioning applies to you and when (or if) you cause Breaking changes.

在NuGet公共存储库(或您自己的私有/内部存储库)上发布时,您需要了解有关SemVer 2.0.0的哪些信息? 那预发行包呢? 您应该嵌入PDB以便于调试吗? 考虑诸如DependenciesSourceLink发布方式发布地点以及版本控制如何应用到您以及何时(或是否)导致重大变更之类的事情。

Also be sure to check out Immo's video on "Building Great Libraries with .NET Standard" on YouTube!

另外,请务必在YouTube上观看Immo的视频“使用.NET Standard构建出色的图书馆”!

翻译自: https://www.hanselman.com/blog/new-prescriptive-guidance-for-open-source-net-library-authors

开源协议 比较说明

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值