Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive nuget restore #2533

Closed
ohadschn opened this issue Apr 13, 2016 · 5 comments
Closed

Recursive nuget restore #2533

ohadschn opened this issue Apr 13, 2016 · 5 comments

Comments

@ohadschn
Copy link

Suppose I want to restore all NuGet dependencies of a project and then build it. So I go

nuget restore foo.csproj
msbuild foo.csproj

Hover, if foo.csproj is dependent on bar.csproj which has its own (different) NuGet dependencies that won't work. The NuGet restore operation will only restore the foo.csproj dependencies.

I suggest a new -Recursive flag to nuget restore which will recursively restore all descendant dependencies, as to allow the scenario outlined above.

@yishaigalatzer
Copy link

You can already restore a solution, or a folder with many csproj files. Is that not sufficient?

Can you help spell out the exact scenario you are hitting?

@ohadschn
Copy link
Author

Suppose you have a folder with 100 csproj files, and a solution referencing those projects. You could restore the entire folder (either by restoring the sln or *.csproj) but that would be wasteful if you just wanted to build foo.csproj.

Just as msbuild knows to build a csproj recursively, building all dependencies first, ideally so should nuget restore, so I could go

nuget restore foo.csproj
msbuild foo.csproj

In that folder and only restore + build foo.csproj and its dependencies (say bar.csproj).

@yishaigalatzer
Copy link

Makes sense, will keep on our backlog

@harikmenon harikmenon modified the milestones: Client-VNext, Future Apr 19, 2016
@yishaigalatzer yishaigalatzer modified the milestones: 3.6 RC, Future Oct 18, 2016
@yishaigalatzer
Copy link

@emgarten I believe you already tackled this one, can you please validate my assessment and update the issue accordingly?

@emgarten
Copy link
Member

Fixed as part of #3577

Use nuget.exe restore foo.csproj -recursive

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

No branches or pull requests

4 participants