Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking to NuGet from GitHub

Tags:

github

nuget

I have a repository on GitHub and I've created a corresponding packing on NuGet. I would like to link to the NuGet package from my GitHub README file.

After modifying some text I found on other repositories, I came up with the following:

[![NuGet version (SoftCircuits.Silk)](https://img.shields.io/nuget/v/SoftCircuits.Silk.svg?style=flat-square)](https://www.nuget.org/packages/SoftCircuits.Silk/)

In a GitHub MD file (and here), this produces the following link:

NuGet version (SoftCircuits.Silk)

That seems good but I'd like to find more about this. After Googling for quite a while, I haven't been able to find where these type of links are documented. Do I have the correct usage? Are there other options I might want to take advantage of? And so on?

Is there a reference for these type of links somewhere?

like image 504
Jonathan Wood Avatar asked Jun 30 '19 19:06

Jonathan Wood


People also ask

How do I add a NuGet to GitHub?

To do so, go to Tools -> Options -> NuGet Package Manager -> Package Sources . Add new source in form of https://nuget.pkg.github.com/<organization>/index.json . You will be prompted to add credentials for the package store.

Is NuGet like GitHub?

GitHub offers both commercial plans and free accounts for open source projects. According to the Git User's Survey in 2009, GitHub is the most popular Git hosting site. NuGet is a Visual Studio extension that makes it easy to install and update third-party libraries and tools in Visual Studio.

What is the NuGet package source URL?

The location of the service index for nuget.org is https://api.nuget.org/v3/index.json .

Can I use NuGet packages from GitHub in my project?

Using packages from GitHub in your project is similar to using packages from nuget.org. Add your package dependencies to your .csproj file, specifying the package name and version. For more information on using a .csproj file in your project, see "Working with NuGet packages" in the Microsoft documentation.

What is source link in NuGet?

Source Link is a language- and source-control agnostic system for providing first-class source debugging experiences for binaries. The goal of the project is to enable anyone building NuGet libraries to provide source debugging for their users with almost no effort. Microsoft libraries, such as .NET Core and Roslyn have enabled Source Link.

Where is the NuGet config file for gihub?

And UI's info stores under global nuget.config file. If you want to config this gihub package source for all the projects on your PC, you should config it on the global nuget.config file. And the first picture which you provided indicates that you used in the global file ( C:\Users\xxx (current user)\AppData\Roaming\NuGet\NuGet.Config ).

How to work with the NuGet registry?

Working with the NuGet registry 1 Authenticating to GitHub Packages. You need an access token to publish, install, and delete packages. ... 2 Publishing a package. ... 3 Publishing multiple packages to the same repository. ... 4 Installing a package. ... 5 Troubleshooting. ... 6 Further reading


1 Answers

Your link comes from the service shields.io, which offers badge images for all sorts of services and all sorts of info. The reason you had a hard time finding documentation is probably because badges aren't GitHub specific, that's just one place you can use them. So if you search for "nuget badge" instead of "nuget github", you'll find the shields.io site is the first result.

As for documentation, it's all at shields.io. Click "Version" and scroll down to see the specific NuGet badge that you're using. There are badges for a lot of other information (size, # of downloads, etc) there, too.

like image 199
Nikolas Stevenson-Molnar Avatar answered Sep 21 '22 23:09

Nikolas Stevenson-Molnar