Skip to content

Conversation

@fgretief
Copy link

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 the packages 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.

@mwrouse
Copy link

mwrouse commented Jun 25, 2018

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.

@keithyipkw
Copy link

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 '\ParentNuget.config\Solution\packages'.

ParentNuget.config.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants