无法完全卸载一个或多个软件包 [英] One or more packages could not be completely uninstalled

查看:55
本文介绍了无法完全卸载一个或多个软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 ASP.NET MVC 4 应用程序.我使用 NuGet 来更新我创建应用程序时安装的所有 NuGet 包.其中一个软件包是 Microsoft.Bcl.Build.

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.Bcl.Build.

更新这些后,NuGet 在其窗口底部显示以下消息:

After updating these, NuGet displayed the following message at the bottom of its window:

此后我已多次重新启动 Visual Studio,但该消息仍然存在.当我检查已安装的软件包时,确实存在软件包的更新版本 (1.0.8).

I have since restarted Visual Studio several times, but the message still exists. When I checked the installed packages, it did appear that the updated version (1.0.8) of the package was present.

我该如何解决这个问题?

How can I fix this?

推荐答案

我认为这个问题是由于包是只读的或在文件系统级别无法访问造成的.

I believe this problem is caused by the packages being read-only or otherwise inaccessible at the file system level.

在告诉 NuGet 重新启动 Visual Studio 以删除包之前检查整个包文件夹.

Check out the entire packages folder prior to telling NuGet to restart Visual Studio to delete the packages.

我发现这可以通过从源代码管理中删除包并使用 NuGet 包还原来永久解决.

I found that this could be permanently resolved by removing the packages from source control and instead using NuGet Package Restore.

我通过从解决方案的 packages 文件夹中删除所有引用相关包的文件来解决这个问题.具体来说,这些是:

I worked around this by deleting from the solution's packages folder all of the files that referenced the package in question. Specifically, these were:

  1. 文件夹:Microsoft.Bcl.Build.1.0.7
  2. 文件:Microsoft.Bcl.Build.1.0.7.deleteme

这篇关于无法完全卸载一个或多个软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆