.Net Core and NuGet

后端 未结 3 824
半阙折子戏
半阙折子戏 2021-01-31 13:44

I installed .net core from this site. Playing with it led to a number of related package management questions:

  1. The dotnet restore command proceeded t
相关标签:
3条回答
  • 2021-01-31 13:59

    Update:

    1. The nuget packages are installed in a global location. By default it used to be ..\Users\[YourUserFolder]\.dnx\packages but it appeared to have changed to ..\Users\[YourUserFolder]\.nuget\packages

    In NuGet 3+, you can use the NuGet CLI's following command to get the global-packages folder location

    nuget locals global-packages -list
    

    Check out following links for more details about NuGet

    • http://blog.nuget.org/20151008/NuGet-3-What-and-Why.html

    • https://docs.nuget.org/ndocs/consume-packages/configuring-nuget-behavior

    • https://docs.nuget.org/ndocs/tools/nuget.exe-cli-reference#locals


    1. The default ASP.Net template has so many packages. Since you tried first time, it tried get all those 100s of packages

    2. You already had those packages in your nuget global locations, it skipped the restore.

    3. Delete all contents under packages folder (location indicated in 1)

    4. Some of the beta packages are there. You can go to project.json file (available under the web root) and play with the dependencies section.

    0 讨论(0)
  • 2021-01-31 14:06

    I just found out that there's another location for NuGet packages used in .NET core projects. Its located at:

    C:\Users\[User]\.nuget\packages

    I think that this location contains regular .NET Framework packages.

    Update: Thanks to brappleye3, here's a link to the documentation regarding dotnet restore.

    0 讨论(0)
  • 2021-01-31 14:17

    I'm working with .Net Core 2.x and, I think, NuGet 4.x. Found Package locations here:

    C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

    0 讨论(0)
提交回复
热议问题