Since I upgraded to nuget 2.7, it is not respecting the repository path that was set in the nuget.config in my solution directory.
It only ignores it when restoring the packages, however if I add a new package it respects the repository path.
How do you make nuget restore to look for the packages in the directory specified in the repository path in my nuget.config?
Restore packages manually or automatically After you enable package restore in Options, you can right-click the solution in Solution Explorer and select Restore NuGet Packages to restore packages anytime.
Quick solution for Visual Studio usersSelect the Tools > NuGet Package Manager > Package Manager Settings menu command. Set both options under Package Restore. Select OK. Build your project again.
msbuild -t:Restore will restore nuget packages for projects with PackageReference nuget management format. And your situation looks like packages. config nuget management format which you have used it.
You are probably experiencing this bug, which has been fixed in NuGet 2.7.2.
Otherwise, could it be that you are using NuGet v2.7 with a solution that was configured to use the MSBuild-integrated package restore approach of NuGet <= v2.6?
Please follow the steps in Migrating MSBuild-Integrated solutions to use Automatic Package Restore. In short, what you should do is remove the .nuget
folder (which contains nuget.exe
, nuget.config
and nuget.targets
) from your solution, and also remove all references to nuget.targets
from your projects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With