Open fgretief opened 6 years ago
This is a problem in our system as well. Was just about to start working on changing this and making a pull request.
@romerod Is there any status on this getting merged and pushed?
It would need a new nuget version.
This is a sample project that reproduces the problem. The correct path to the packages folder should be ParentNuget.config\packages
. The error is
The "PackageRetrievalTask" task failed unexpectedly.
System.IO.DirectoryNotFoundException: Could not find a part of the path '
In our system we have a NuGet.config file that lives higher up in the tree than the solution file and it specifies where the
packages
folder is located. Our builds break because Contrib.NuGet assumes thepackages
folder is in$(SolutionDir)/packages
if it cannot find the NuGet.config file. This pull request fixes that issue.According to the NuGet documentation, the NuGet.config file is searched by looking through the parent folders until the root folder.