Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Persistent Warning: "Multiple packages failed to uninstall."

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.

enter image description here

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?

like image 609
InteXX Avatar asked Apr 15 '17 03:04

InteXX


3 Answers

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.

like image 99
InteXX Avatar answered Oct 21 '22 08:10

InteXX


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.

like image 6
Richard Moore Avatar answered Oct 21 '22 08:10

Richard Moore


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.

like image 3
bitwit Avatar answered Oct 21 '22 08:10

bitwit