Create a .NET Open Source Library: Lessons Learned
Educator 2
Thursday 24 July, 14:00 - 14:45
This session shares practical lessons learned from the process of creating and maintaining a .NET open-source library. We'll go beyond the technical aspects, exploring the challenges and rewards of open-source contribution and providing actionable advice for aspiring library authors.

Target Audience: .NET developers interested in contributing to open source or creating and publishing their own libraries.

Learning Objectives: By the end of this session, participants will be able to:

- Understand the key characteristics of high-quality .NET open-source libraries, including inclusivity, stability, evolvability, debuggability, and trustworthiness.
- Apply best practices for library design, focusing on testability, dependency injection, and clear documentation.
- Effectively utilize NuGet for package creation and publishing, including versioning and handling breaking changes.
- Manage community contributions, feedback, and issues.
- Navigate the legal considerations involved in open-sourcing code from a workplace environment.

Session Outline:
Introduction & Defining Success: We'll kick off by defining what constitutes a "successful" open-source library – it's not just about download numbers! We’ll emphasize the importance of solving real-world problems and building a thriving community.

Technical Best Practices: This section will cover key technical aspects, including:

- Cross-platform compatibility: leveraging .NET Standard and multi-targeting.
Testability: building libraries with testability in mind from the outset.
Dependency Injection: strategies for incorporating DI without imposing opinions on users.
Documentation: the importance of clear, concise, and comprehensive documentation (inline, README, examples).
NuGet Package Creation & Publishing: Best practices for versioning (SemVer 2.0.0), metadata, and security.
Source Link: enabling easy debugging for library users.

Community & Collaboration: This segment will address the crucial aspects of community engagement:

Handling contributions: gracefully receiving, reviewing, and integrating pull requests.
Managing issues: effectively responding to and resolving reported bugs and feature requests.
Balancing community feedback with project vision: respectful handling of suggestions that might deviate from the core purpose of the library.
Open communication: maintaining a positive and helpful atmosphere within the project community.

Legal and Practical Considerations:

Open-source licenses (choosing the right license for your project).
Obtaining necessary permissions from employers before releasing work-related code.[4]
Maintaining motivation and dealing with burnout.
Setting realistic expectations and accepting that a project may not achieve widespread popularity.

Finally, we will conclude with a Q&A session and emphasize the importance of continuous learning and improvement in the open-source world. Participants will leave with a clearer understanding of the journey of creating and sustaining a successful .NET open-source library.