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

Add ability to preempt nuget search with local folder ('NuGetPrefetchFolder') #12515

Open
JanKrivanek opened this issue Mar 30, 2023 · 2 comments
Labels
Functionality:Restore Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Type:Feature

Comments

@JanKrivanek
Copy link

NuGet Product(s) Involved

NuGet SDK

The Elevator Pitch

Idea brainstormed by @zivkan

For manuall or automated ways of testing multi-project changes, that are tight together via PackageReference (e.g. project A, references project B as nuget, while developer needs to perform orchestrated change to both) the existing functionality of NuGetFallbackFolder might be tweaked and reused for easy testing of validity of the nuget package without the need to 'hacking' nuget cache.

  • a nuget of B would be build
  • added to relative NuGetPrefetchFolder (that one would not get synced to global cache - same as NuGetFallbackFolder)
  • restore would check the NuGetPrefetchFolder first and get package from there if available
  • other unrelated project would get the B from global cache (skiping the NuGetPrefetchFolder)

If functionality of NuGetFallbackFolder would be reused, then possibly a CLI support for equivalent of nuget add would need to be added - in order to be able to unzip and push a local nuget to local folder in v3 layout.

Other question is the location of NuGetPrefetchFolder - is it fixed or configurable via packages.config? It needs to be per 'build-bundle', not global to the machine - as we want to avoid 'poisoning' of nugets for unrelated builds

Additional Context and Details

No response

@zivkan
Copy link
Member

zivkan commented Mar 30, 2023

This is effectively a design proposal for #6579

@jeffkl jeffkl added Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Pipeline:Icebox labels Apr 6, 2023
@gioce90
Copy link

gioce90 commented Dec 30, 2024

For manuall or automated ways of testing multi-project changes [...] might be tweaked and reused for easy testing of validity of the nuget package without the need to 'hacking' nuget cache.

I agree. I’ve faced similar issues in the past when working with NuGet packages. As I mentioned here.
However, in the meantime I’ve decided to make my solution public by releasing a package called NuJet (https://github.com/gioce90/NuJet). It enhance the inner-loop development and testing process for NuGet packages, especially in local.

Feel free to check it out—I’d love to hear your feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Restore Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Type:Feature
Projects
None yet
Development

No branches or pull requests

5 participants