Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nuget restore command from different directory

I try to run the following nuget command , in the "D:\work\Development\" directory there is solution file

nuget.exe restore D:\work\Development\

I received an error

Could not find a part of the path C:\work\Development

When I copy the nuget.exe file to the directory D:\work\Development and run resotre like so

nuget.exe restore

from there it works

How can I make restore work from another directory than the one my solution is in?

like image 742
Shachaf.Gortler Avatar asked Jun 02 '26 21:06

Shachaf.Gortler


2 Answers

What I ended up doing is using restore from with a relative path like so :

nuget.exe restore ..\
like image 113
Shachaf.Gortler Avatar answered Jun 06 '26 06:06

Shachaf.Gortler


You should pass in the path to the .sln file, such as D:\work\Development\mysolution.sln or path to the packages.config file.

Please refer to this doc for how to use the nuget.exe restore command.

http://docs.nuget.org/docs/reference/command-line-reference#Restore_command

like image 27
Dan Liu Avatar answered Jun 06 '26 06:06

Dan Liu