Where does Nuget store details about the sources from where it gets the packages

Mahfuzur Rahman 1 Reputation point
2021-05-10T15:30:19.877+00:00

Hi there. I am learning C# with visual studio. I recently discovered about nuget and the benefits that it provide. But, I am really curious to know does it stores the links or details about the sources from where it downloads the packages. After light digging around myself, I was able to find out the visual studio shows sources in the package manager setting. Also, I was able to find that I can print out the sources in console by using dotnet cli. But, I am really curious to know, is there are any configuration file or something like that where it stores all the information and where it is.

I will be really grateful to you if you kind answer my queries. Thanks in advance.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,969 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Karen Payne MVP 35,016 Reputation points
    2021-05-10T16:28:55.79+00:00

    The author of a package sets properties under project properties and target Frameworks (read this page) and this page, manifest and package configuration file. Also see How NuGet resolves package dependencies.

    There are also PowerShell commands and arguments

    Internally on NuGet a private database stored all package details.


  2. Timon Yang-MSFT 9,571 Reputation points
    2021-05-11T01:50:29.877+00:00

    When you download the nuget package, there will be a .nuspec file that stores some basic information about the package.

    .nuspec reference

    The path is as Karen said, this is an example of EntityFramework:

    95397-3.png


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments