Release 1.0.1
Today, I was able to package and publish my first NuGet package. Since my project used the .Net framework, I chose NuGet as my package registry.
Packaging Process
The process for packaging my project was very easy and straightforward. I found a great video from the .Net YouTube channel that helped me with this. The video can be found here.
Steps Using Visual Studio:
- Select the project properties from the project menu
- Fill in the details for the package like: Package ID, Title, Authors, Package Version, etc.
- After the details are filled in, select Pack from the Build menu.
- A new .nupkg will file will be created under bin/debug folder of the project (This is a default output folder when packing a project, a custom folder can be selected in the previous step).
- Ready to be released.
Publishing Process
The publishing process was very straightforward as well. The steps are as follows:
- Sign in to Nuget.org with a Microsoft account.
- Select upload package from the menu.
- Upload the newly created .nupkg.
- Wait for the review to be finished.
- The package is published and ready to be used.
Testing
In order to test out that users were able to use my package, I asked one of my developer friends to test it out for me. Since this is a NuGet package we were not able to run it from the command line. But, he was able to install the package from the NuGet package manager in Visual Studio and add it as a dependency to a test project he had created. From the test project he was able to run the converter and test out all the functionalities that I had implemented.
Code Alteration
Luckily I didn't have to make big changes to my code base. I simply added a new public class called "Converter" which was in charge of running the program, so that it'll be accessible when users add the package to their project.
Package Installation and Usage
This package can be installed from the NuGet package manager by searching for "Amir.Txt2StaticHtml"
Or by going to this page and using any of the commands provided. After the package is added to the project simply run the Converter.Run(string[] args) function from the Text2StaticHtml namespace with the valid arguments that can be found in the Readme.
Top comments (0)