-
Notifications
You must be signed in to change notification settings - Fork 255
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
[Feature Request] Disable caching for Local Feed #13918
Comments
I have a problem with this as it needlessly constrains the usage of this feature. Additionally, it conflicts with your proposed "package" syntax Instead, a more general solution that allows disabling caching on either feeds or packages would be preferred. So, a remote feed could have its caching disabled or a singular package within the feed could. This would benefit most for local feeds but there is no reason to limit the design to only it. |
Closing in favor of #6579 |
@CEbbinghaus , you’re absolutely right — this wasn’t my first choice either. In my opinion, the best approach would be to place I suggested applying it only to Local Feeds because disabling the cache for a remote feed feels a bit unusual to me — after all, there’s a reason the cache exists. That said, it might make sense in specific cases for individual packages? The NuGet team decided to close this feature request in favor of a more generic (and older) issue, which has been open since 2018... In the meantime, I’m working on a solution myself. Once it’s ready, I’ll share it and post it here. |
Hi @CEbbinghaus , I worked on a solution by myself, as I mentioned here and also here. I’ve now decided to make my solution public by releasing a package called NuJet (https://github.com/gioce90/NuJet). It enhances the inner-loop development and testing process for NuGet packages, especially in local workflows. Feel free to check it out—I’d love to hear your feedback! |
NuGet Product(s) Involved
NuGet.exe, NuGet SDK
The Elevator Pitch
I'm asking the same feature in #8251 , in light of new clearer reasons of which is the common scenario that the feature will resolve.
For local development purposes this feature is a must-have: I exhaustive described here a common scenario, but - shortly - the idea is to give to developers the freedom to works on their local machines using Local Feeds without facing cache issues.
This is especially needed when we work on 2 or more local projects, where one is a package project and the other is a project who consumes the package. When a developer make some changes on a package, before to push these changes he wants to test the changes using (in local) other project(s) which consumes the edited package. All of this happens in local and doesn't involve yet the CI/CD pipelines. This is a really common scenario in companies with large codebase and numerous package projects.
Note that the purpose here is not to skip the CI/CD, but just speed-up the local development.
So the request is: only and exclusively for packages on the local machine, that the cache should be disabled.
It could be by default or, as suggested here, with this configuration:
Of course
disableCache="True"
should works only for local feeds.Another solution it can be to operate on the in the .csproj in this way:
Any other ideas on how to disable cache for packages on the local machine are welcome.
Additional Context and Details
In local I use to produce a package using this convention: MyPackage.x.y.z-Local ... now, we all knows that increment the version is really important when we are shipping the package, but in local it should not be a serious thing, because is just distracting and a waste of time and focus.
But using just the "-Local" suffix without increment the version means facing cache issues: this should due to global packages folder that keep the old package (I don't think that http-cache is involved).
Note:
<PackageReference>
tag with the more directly<Reference>
tag in the .csproj of the project who uses the package expose to easy mistakes and compromises other things.The text was updated successfully, but these errors were encountered: