Callisto82 / tftp.net

Implements the TFTP (Trivial File Transfer) protocol (client/server) in an easy-to-use C#/.NET library.
Microsoft Public License
80 stars 38 forks source link

Create an own nuget package #21

Closed tinohager closed 2 years ago

tinohager commented 4 years ago

Hi Michael

Can you create an own nuget package? You must register a nuget.org Account and create an api key. After that you can publish your own package to nuget.org. Also an option is to automate this step with appveyor.

I can help you with this steps?

Best regards Tino

Callisto82 commented 3 years ago

Hi and sorry for what is probably the most delayed response you have ever received ;) I would love your help on these matters - if your offer still stands? In fact, I have never published to nuget.org before.

Kind regards, Michael

tinohager commented 3 years ago

Yes my offer still stands :)

We have two options

Callisto82 commented 3 years ago

Ok, so I did create a nuget-account and I also got ownership for the existing tftp.net nuget package: https://www.nuget.org/packages/Tftp.Net

Is there a good tutorial on how nuget-publishing is preferably done? I would love to have a CI/CD pipeline that builds from github and publishes new packages.

tinohager commented 3 years ago

You can copy a workflow from my project, and change the folders. After you create the file the workflow automatic starts. https://github.com/nager/Nager.Country/blob/master/.github/workflows/dotnet-core.yml

drvic10k commented 3 years ago

it would be nice if you could also sign the assembly as that is another issue that was blocked by not owning the nuget package

Callisto82 commented 3 years ago

So, it took a while for me to convert the project to the new Visual Studio format. This now allows to build the nuget package from Visual Studio. I did that and just uploaded a new version to nuget.org.

@drvic10k: Do you have any suggestion on which CA would provide a free certificate that is accepted by nuget.org?

drvic10k commented 3 years ago

@drvic10k: Do you have any suggestion on which CA would provide a free certificate that is accepted by nuget.org?

I think you can create it yourself like this: https://docs.microsoft.com/en-us/dotnet/framework/tools/sn-exe-strong-name-tool?redirectedfrom=MSDN

Callisto82 commented 3 years ago

I see, you were talking about a strongly-named seembly, not a signed nuget package. I will close this issue then, because signing the assembly isn't really related to publishing it on nuget.org.

Just out of curiosity: Why do you require a strongly-named assembly? Most of the benefits listed here don't strike me as particularely important: https://docs.microsoft.com/de-de/dotnet/standard/assembly/strong-named

drvic10k commented 3 years ago

yes you are right that it is not directly related, just it is now possible when you own the package

I require the strongly-named assembly because when you have strongly named assembly, you can only reference strongly-named ones and that is the situation in our project