• 0

How do I share my class on NuGet? - Some Questions


Question

After reading this, I don't know where to start:

https://docs.nuget.org/create/creating-and-publishing-a-package

 

I have an MVC 5 app in which I've created a separate class (No class library, just a simple class) for connecting to a REST service. I'd like to create a NuGet package and share it with everyone. And if it's possible to give away the code. But I don't understand what is the best way to do that. I'm currently using Sync methods. I'll be adding async ones soon! 

I've tried doing a Portable Class LIbrary, but I'm having problems on referencing some System.Net; System.IO methods, such as:

WebClient (Which it seems that there is an async portable version from MS)

HttpWebRequest

StreamExtensions.Close

HttpWebRequest

 

Before I'm  ditching it, I'd like some guidance on what to do. 

 

At the end, I'd like to share the code with everyone, hopefully with a NuGet package + GitHub repository so everyone can benefit from it!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Can you share the code on github now so we can see what you have? 

Even if you have just one class, you need to create a project for that class and then use nuget to package/distribute that assembly.

Link to comment
Share on other sites

  • 0

1. Start with making a GitHub project - right away that's sharing!

2. Search GitHub for Nuget stuff - people have shared utils and starter stuff for making your Nuget package. So take advantage of that!

 

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.