1
votes

I have a solution which has a two projects. In the both the projects I have packages.config file which has the list of packages that the project uses. Whenever I build the solution I'm getting the below error

The command "*\Tools\nuget install \packages.config -o \Packages" exited with code 3.**

(replaced folder path with **)

I have installed all the packages manually using package manager console. The installation is successful. When I build the solution now i'm getting the below error

The command "*\Tools\nuget install \packages.config -o \Packages" exited with code 1.**

I have cleared the cache of packages. Still I get this error. Not sure why the solution build is trying to install the packages.

3
Try running the failing nuget command line from a console window. You should see the actual error message instead of just the exit code. - Matt Ward
I have installed all the packages from console window. The packages installation was successful. But still I get this error. - mgopi
I mean run NuGet.exe from the Windows console (cmd.exe) outside of Visual Studio using the command line that is exiting with code 1. - Matt Ward

3 Answers

1
votes

You can try adding -verbosity detailed to your command *\Tools\nuget install \packages.config -o \Packages to get detailed error message to help you investigate the cause.

1
votes

This was happening in a new CI build I set up yesterday. The problem was that NuGet.exe wasn't at the specified path.

"exited with code 3." wasn't an error from NuGet.exe but from MSBuild.

0
votes

If you were using TFS, be sure to include the location of the Nuget package in the Source Settings of build definition. This error can indicate it cannot access the files.