Search code examples
visual-studio-2017nugetnuget-packagenuget-package-restore

where does Nuget download packages when PackageReference is enabled


In visual studio 2017 i have enabled PackageReference so that package reference will be stored in csproj file instead of package.config file

I have added these 2 line in csproj file to enable PackageRefernce

<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

Now when i install any package using Nuget Package Manager, i see something like this

enter image description here

references with blue icon are added as package.

However i dont see any of these packages in packages folder under solution directory. Moreover, if i right click on blue icon (i.e reference) and click on properties, the window the blank. I cannot see the path where its referencing from

So when does Visual Studio download the packages when package? reference is enabled


Solution

  • looks like it installs the packages in %UserProfile%\.nuget\packages\

    when packagereference in enabled