This article is a mirror article of machine translation, please click here to jump to the original article.

View: 51940|Reply: 2

[Source] NuGet clears the cache

[Copy link]
Posted on 2021-4-14 14:30:31 | | | |
Requirements: Since the project uses packages from the private nuget repository, it is often necessary to push the latest code to the private repository when the version number remains unchanged.

All NuGet cache can be cleaned via VS - options - nuget package manager



You can also clean all nuget package caches via the command line, as follows (not tested):

Then, clean up the solution, rebuild the project, and there will be no problem!

However, I just want to clean up the package names whose names contain itsvse, what if I don't want to clean up all the packages?

I tried to delete the package under C:\Users\itsvse_nuc\.nuget\packages, and then pushed the new package to the repository, and when I restored the nuget package, I found that the content of the package was still the old version of the code!!When you restore the nuget package to the repository where you push the new package, you will find that the content of the package is still the old version of the code!!When you restore the nuget package to the repository where you push the new package, you will find that the content of the package is still the old version of the code!!

It turns out that not only do you need to clean the contents of the NuGet global cache folder, but you also need to clean the NuGet HTTP cache cache.

Clearing NuGet HTTP cache
C:\Users\itsvse_nuc\AppData\Local\NuGet\v3-cache

Clearing NuGet global packages folder
C:\Users\itsvse_nuc\.nuget\packages

Clearing NuGet Temp cache
C:\Users\itsvse_nuc\AppData\Local\Temp\NuGetScratch

Clearing NuGet plugins cache
C:\Users\itsvse_nuc\AppData\Local\NuGet\plugins-cache
The CMD script is as follows:

(End)





Previous:Kafka operations for .NET/C# message queues [with source code]
Next:CMD gets the absolute path to the current directory
 Landlord| Posted on 2021-4-14 14:50:02 |
Posted on 2021-9-22 20:27:12 |
Learn to learn...
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com