One or more packages could not be completely uninstalled

前端 未结 9 1426
栀梦
栀梦 2021-02-06 20:44

I have an ASP.NET MVC 4 application. I used NuGet to update all of the NuGet packages that were installed when I created the application. One of the packages was Microsoft.B

相关标签:
9条回答
  • 2021-02-06 21:03

    1) Delete the entire ~\packagesfolder.

    2) Restart VS.

    3) Go to Manage NuGet Packages and Restore

    0 讨论(0)
  • 2021-02-06 21:04

    ** Hi, everybody.**

    i resolve this problem this ways.

    1. If you have source control run the vs as administrator ( it is important )

    2. in the solution packages -> delete thing about packages. sample -> i deleted all entity framework version folders.

    3. restart the vs

    4. open solution and solution right click -> manage nuget packages for this solution. you will see restore button :) restore

    that is all.

    0 讨论(0)
  • 2021-02-06 21:10

    Instead of deleting all of ~/packages, see if there are any *.deleteme files in ~/packages and delete them. Then restart Visual Studio.

    0 讨论(0)
  • 2021-02-06 21:10

    I've just deleted the folders of each package that had error in the Packages folder in my solution folder and also deleted the .deleteme files and everything works fine!

    0 讨论(0)
  • 2021-02-06 21:11

    In my experience, I found my answer on this thread, but using a combination of a couple of different answers above so I thought I would share what I found.

    I had the exact same issue with "Microsoft.Bcl.Build" as the original poster. I had been trying to update references for other functionality using NuGet and had issues with some of the updates (compatibility then rollbacks). After this NuGet failure, I started getting this error.

    I initially used the selected answer and Jedidja's answer and was able to get this to work, but it only partially solved my problem. It did fix the VS restart error, but it caused a downstream issue with TFS as I could no longer check in the project as it was expecting that "*.deleteme" file. This got me thinking, so I did some testing. When I restored the file from recycle bin, I started getting the restart error again.

    Here is where I deviated from the posted answers and got my full resolution to my version of the problem.

    When I checked into TFS this time, the project checked everything in (after I got the projects all updated using NuGet while the "*.deleteme" file was deleted). Once it checked everything in, I noticed that file was still pending check-in so I checked the solution in again and TFS accepted that file, but it was as a deletion....assuming it checked in the first time and then VS auto deleted it which required the second check-in. Anyway....after the last pending change check-in, the file was gone and VS no longer complained about needing to be restarted. I can't say for sure because the problem is gone, but I get the feeling if I had checked the code in before deleting the file in the first place it might have solved the problem without manual file manipulation.

    0 讨论(0)
  • 2021-02-06 21:20

    In my case, the relevant package folders remained in ~\packages, although they were empty. I deleted the folders and restarted Visual Studio, and this warning went away.

    0 讨论(0)
提交回复
热议问题