How does NuGet decide whether to use local package cache or not?

我的未来我决定 提交于 2019-12-03 02:21:10

Yan,

I push another update of MyPackage - still of version 1.0.0.

You should not be pushing more than one package with a particular version: packages should be immutable. If you've changed something in the package, increment the build number a.b.C and push a new version of the package.

The behaviour you experience is a side effect of NuGet expecting to be able to cache a given package version essentially indefinitely.

Yan,

NuGet caches the packages it downloads on your local hard drive. For my windows 7 machine the cache is located at C:\Users\jmelosegui\AppData\Local\NuGet\Cache. So you can delete the nuget package you want to forget from the local cache directory. Then the next time you install the package you will get the lastest version from the server.

BTW: I am agree with @matthew-skelton.

You should not be pushing more than one package with a particular version: packages should be immutable. If you've changed something in the package, increment the build number a.b.C and push a new version of the package.

I hope this aproach fit in your scenario

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!