I have a warning message that came to dinner but now won't leave.
Multiple packages failed to uninstall. Restart Visual Studio to finish the process.
Unfortunately, however, restarting Visual Studio has no effect—the warning remains.
I've tried cleaning the solution as well as the project; all of my projects' assembly references are intact. I've also issued an Update-Package -Reinstall
command—which succeeded—to no avail.
How can I set about fixing this?
I believe this may have been caused by a File Explorer folder lock.
I received a similar warning later, this time for a specific package; because I now knew which package it was I was able to use Lock Hunter to discover why it wasn't deleted.
I closed File Explorer, restarted VS, and the warning was no longer present. The original warning—the subject of this Q&A—was gone the next day, after having signed out and back in to Windows.
I tried resetting permissions on the packages folder various different ways. Reset the owner, reset all child permissions, added my user account to permissions with full control etc... Tried killing Explorer process to release locks on files.
None of that worked.
What did work was to delete the entire contents of the packages folder (made a backup first) and let Visual Studio restore all the packages the next time I loaded it.
This was a permission issue within the packages folder for me. Used a PS script to determine if files were locked or with other errors such as access denied; changed the permissions and restarted visual studio. All was good afterwards.
Here is the PS script used: Check for locked files in Directory and find locking applicaiton
Changed the gci command to include -Recurse.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With