How I Built a NuGet Package
Introduction
Open-source software has always been a cornerstone of the programming world, providing a platform for innovation and collaboration. Despite being a firm believer in its power, I never saw myself as someone who would contribute to this vast ecosystem. However, life often takes unexpected turns, and I found myself developing a NuGet package in C#.NET.
The Inspiration
The inspiration for this project came from a simple realization - I had a collection of functions that I frequently used across my projects. These functions were versatile, efficient, and most importantly, reusable. It dawned on me that these functions could be beneficial to other developers as well. So, I decided to package these functions into a library and make it open-source.
The Package
SharpStackConvert is a C# library that provides a collection of extended methods for type conversion and data manipulation. Here are some of its key features:
Type Conversion: The package includes extended methods for converting types, such as ToString, ToInt32, ToInt64. These methods make it easy to convert data types in C#, saving developers time and reducing potential errors.
String to Base64 Conversion: SharpStackConvert allows you to convert strings to base64 and vice versa. This feature is particularly useful when you need to encode or decode data in base64 format.
Hashing Methods: The package provides various hashing methods. Hashing is a common technique used in programming for a variety of purposes, such as data retrieval and password storage.
List and Array Conversion: SharpStackConvert includes utilities for handling lists and arrays. It can convert these data structures to CSV and vice versa, making it easy to work with data in different formats.
CSV to Table Conversion: One of the standout features of SharpStackConvert is its ability to convert CSV data to tables and vice versa. This feature is incredibly useful when working with large datasets, as it allows for easy data manipulation and analysis.
In summary, SharpStackConvert is a versatile tool that aids C# developers in their day-to-day programming tasks. Its wide range of features makes it a valuable addition to any developer's toolkit.
The Journey
The journey of creating this NuGet package was an enlightening one. Here are the key steps I took:
Collection of Functions: I started by gathering all the functions that I had written for my various projects. These were functions that I found myself using repeatedly and realized they could be beneficial to other developers as well.
Refinement with GitHub Copilot: Once I had all my functions, I used GitHub Copilot to refine them. This AI-powered tool helped me optimize my code and make it more efficient.
Naming the Package: After refining the functions, I gave the package a fitting name - SharpStackConvert. The name reflects its purpose and functionality.
Creating a GitHub Repository: The next step was to create a GitHub repository for SharpStackConvert. This would serve as the home for the package where developers could access it, provide feedback, and contribute to its development.
Licensing with the MIT License: I decided to license SharpStackConvert with the MIT License. This permissive license is simple and straightforward, allowing others to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software.
Writing the readme.md with ChatGPT and Bing AI: The final step was to write a comprehensive readme.md for the package. For this, I took the help of ChatGPT and Bing AI. These AI-powered tools helped me create a clear, concise, and informative readme that would guide developers on how to use SharpStackConvert.
Installation
Installing SharpStackConvert is straightforward. You can use the NuGet package manager with the following command:
PM> NuGet\Install-Package SharpStackConvert -Version 1.0.0.2
Alternatively, you can use the dotnet CLI Command:
dotnet add package SharpStackConvert --version 1.0.0.2
The Community
The .NET community has been incredibly supportive. The feedback I received after the 3rd update was overwhelmingly positive, which has inspired me to continue working on this project and contribute more to the open-source community.
I invite all .NET developers to use SharpStackConvert, test it, and provide feedback. Feel free to create issues in the GitHub repo and contribute by creating pull requests. Your contributions will not only help improve SharpStackConvert but also benefit the entire .NET community.
Check it out here
Here are some important links related to SharpStackConvert:
NuGet Package: SharpStackConvert
GitHub Repository: SharpStackConvert Repo
Issues Section: GitHub Issues
Conclusion
Building SharpStackConvert has been a rewarding journey. It has taught me the value of sharing knowledge and how a simple idea can turn into a tool that benefits many. I'm excited to continue this journey, contribute more to the open-source community, and hopefully make a difference in the lives of other developers.
This is not an end but just a beginning of building a great project with the help of the community. The power of open-source lies in collaboration, and I look forward to seeing how SharpStackConvert evolves with the contributions from the .NET community.
Let's build a great thing for the entire C# community that has given us a lot over the years. Thank you for your support, and happy coding!
Subscribe to my newsletter
Read articles from Ishrar G directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Ishrar G
Ishrar G
I specialize in developing, deploying, and integrating IT solutions with 16 years of experience in Microsoft technologies (.NET, Azure, SQL Server). I've led teams at SharpStack Technologies and Fraxinus IT Solutions to deliver successful projects for over 2,000 businesses. My passion is helping businesses leverage technology to solve problems and achieve growth.