1

I am trying to add packages from https://github.com/orgs/DKE-Data/packages to my asp.net project. Here are the things I have tried

  1. Download the package.nupkg file and add the location to the package manager source but it does not allow me to install the package.
  2. Add the PackageReference to .csproj file and did a restore - did not work

As these packages are publicly available isn't there a straight forward approach to add them to my packages?

Appreciate any help here!

1 Answers1

0

In order to use this feed you need to configure it. I suggest creating a nuget.config file next your solution file (.sln) with the following contents:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <packageSources>
        <add key="github-DKE-Data" value="https://nuget.pkg.github.com/DKE-Data/index.json" />
    </packageSources>
</configuration>

Then (maybe after re-opening the solution in visual studio or other IDEs) you should be able to add the pacakge via the NuGet UI or directly in the csproj file.

For more information on how to use GitHub packages for NuGet see Configuring dotnet CLI for use with GitHub Packages as you may need to set up authentication as well.

Martin Ullrich
  • 94,744
  • 25
  • 252
  • 217
  • It allows me to add after I created a token and used it in the solution. But if this solution is shared across other team members every one has to have a github account? I definitely don't want to share my access token! – Hemachandra Ghanta Apr 02 '21 at 17:07
  • hello there. I am a junior web developer and so far I know how web dev technologies works but I am still trying to figure out how to apply them. my question is: how do I add a package that is not NuGet ready to a .Net application? I mean do I clone the repo to my server (containing my code) and access them locally from my application? – victorien sukarieh Feb 20 '22 at 20:04