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

后端 未结 2 1391
慢半拍i
慢半拍i 2021-02-05 16:49

Today I\'ve faced with a strange behavior of NuGet when installing a package.

A brief description: as a result of my build script there\'s a NuGet package. I don\'t chan

2条回答
  •  北恋
    北恋 (楼主)
    2021-02-05 17:37

    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

提交回复
热议问题