-
Notifications
You must be signed in to change notification settings - Fork 258
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
Force no cache for single package source in nuget.config #8745
Comments
Similar to #3116 |
When I'm creating or modifying a library, I will temporarily output the package to a local folder which is defined as a package source. Being able to turn off caching for that source would be a huge time-saver. Currently after rebuilding the library, I have to unload the solution that uses the package, manually delete the cached version, then re-open the solution to restore the package. I was going to post a suggestion that local package sources shouldn't be cached at all (which is still probably a good idea), but more generally, having the option to disable caching per-source would be pretty useful. I don't think that 3116 is related. |
This does seem to be related: #6579 |
could we have a no-cache flag in the nuget.config? <?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="local" value="../nuget" no-cache />
</packageSources>
</configuration> |
This We have a policy of putting private packages within the source repositories which use them. This eliminates dependencies on internal package servers, etc. Each major repository contains a The problem is that when a developer updates a private package, their machine's global cache still contains old versions. Package restore may resolve old versions of these packages as dependencies of other packages. Such situations typically build fine on the CI servers too as they also have all of the old versions cached. But the build then fails on a new machine, or if the global cache is cleared. As a workaround we could clear the global cache before every build, but re-fetching everything takes ages. We absolutely do want public packages to appear in the global cache and stay there. But IMO there is absolutely no case ever when these private packages should end up in the global cache. They come from the local filesystem and do not need to be cached anywhere. |
I see that this specific request is mainly made to address the problem of developing packages on the local machine. I faced the same issue as you. I recently 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! |
We're using package version wildcards for some of our internal libraries to make it easier to update them, but as it stands now, they wont get updated to the newest version (matching the wildcard) without the use of the no-cache operator, which also applies it to nuget.org package source. Ideally it would be if no-cache was applied to all wildcarded packages, but if I could apply it to a single package source (our internal one), this would suffice.
The text was updated successfully, but these errors were encountered: