Why isn't there any packages folder in my .NET Core solution's containing folder?

前端 未结 4 652
我在风中等你
我在风中等你 2021-02-02 04:59

Are packages now cached in a more shared location somewhere or what?

My solution folder is devoid of any packages folder:

4条回答
  •  Happy的楠姐
    2021-02-02 05:23

    To force ./packages folder for Solution

    To force download of packages folder to be a child of the solution folder for .NET Core projects, follow these steps:

    1. Create a NuGet.Config file in the same directory as the .sln file.

    2. Copy the following contents into the NuGet.Config file:

    
    
      
        
      
    
    
    1. Configure NuGet to download missing packages by:

      3.1. In Visual Studio: Tools -> Options

      3.2. Filter by nuget (top left in dialog). Select General

      3.3. Ensure Allow NuGet to download missing packages is checked

    1. Close and re-open the solution. NuGet will download the required packages.

    Note: the NuGet.Config configuration can also be achieved by executing the following command from the NuGet Package Manager Console (Tools -> NuGet Package Manager -> Package Manager Console):

    PM> nuget config -set globalPackagesFolder=.\packages -configfile "$(pwd)\NuGet.Config"
    

提交回复
热议问题