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.

Developer technologies | C#
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Karen Payne MVP 35,586 Reputation points Volunteer Moderator
    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,606 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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.