baseclass / Contrib.Nuget

Extending nuget with nuget packages
MIT License
30 stars 21 forks source link

The "PackageRetrievalTask" task failed unexpectedly #33

Closed omatrot closed 6 years ago

omatrot commented 7 years ago

Using the latest prerelease version of the nuget in both VS 2015 & VS 2017 I have the following error during compilation.

The "PackageRetrievalTask" task failed unexpectedly. 1>D:\CUSTOM_PATH\packages\Baseclass.Contrib.Nuget.Output.2.3.0-vs20172\build\net40\Baseclass.Contrib.Nuget.Output.targets(65,5): error MSB4018: System.IO.DirectoryNotFoundException: Could not find a part of the path blablabla\packages'.

CUSTOM_PATH & blablabla above are obfuscation of real paths.

Please note that we're sharing packages at the root of our TFS branch. The task seems to look for packages in the solution folder.

We do have a repositoryPath configured in a nuget.config at solution level: <add key="repositorypath" value="$\..\..\..\..\..\packages" />

.csproj included. csproj.zip

loicmorvan commented 7 years ago

I have the same issue: we put the packages at the root of our branches in a special folder named 'ThirdParties' and not 'packages' but it looks for 'packages'.

omatrot commented 7 years ago

@loicmorvan I'm temporarily using a directory symbolic link to solve the problem.

loicmorvan commented 7 years ago

@omatrot For now, I can just use the version "v2.2.0-xbuild02" which works well waiting for a new update.

DuAell commented 7 years ago

Issue still alive in v2.3.0

shauser commented 7 years ago

I just created PR #38, which addresses this issue.

fabiosalvi commented 7 years ago

@omatrot @loicmorvan @DuAell @shauser see issue #39

romerod commented 6 years ago

PR merged

omatrot commented 6 years ago

This works only we you case the config parameter name correctly. In the sample I've given above, repositorypath is lower case. It still fails. It works with an uppercase P for path: repositoryPath.