开源协议 比较说明_开源.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以便于调试吗? 考虑诸如Dependencies , SourceLink ,发布方式和发布地点以及版本控制如何应用到您以及何时(或是否)导致重大变更之类的事情。
Also be sure to check out Immo's video on "Building Great Libraries with .NET Standard" on YouTube!
另外,请务必在YouTube上观看Immo的视频“使用.NET Standard构建出色的图书馆”!
Sponsor: Check out the latest JetBrains Rider with built-in spell checking, enhanced debugger, Docker support, full C# 7.3 support, publishing to IIS and more advanced Unity support.
赞助商:使用内置的拼写检查,增强的调试器,Docker支持,完整的C#7.3支持,发布到IIS和更高级的Unity支持,查看最新的JetBrains Rider 。
关于斯科特 (About Scott)
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
斯科特·汉塞尔曼(Scott Hanselman)是前教授,前金融首席架构师,现在是演讲者,顾问,父亲,糖尿病患者和Microsoft员工。 他是一位失败的单口相声漫画家,一个玉米种植者和一本书的作者。
翻译自: https://www.hanselman.com/blog/new-prescriptive-guidance-for-open-source-net-library-authors
开源协议 比较说明