如何卸载特定版本的 NuGet 包? [英] How to uninstall specific version of a NuGet package?

查看:176
本文介绍了如何卸载特定版本的 NuGet 包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不知何故,我的一个项目中有同一个 NuGet 包的两个版本.

I somehow have two versions of the same NuGet package in one of my projects.

有没有办法卸载该软件包的特定版本?

Is there a way to uninstall a specific version of that package?

我已经尝试了 Uninstall-Package [name]Install-Package [name],尽管这似乎保留了两个版本.

I've tried Uninstall-Package [name] and then Install-Package [name], although this seems to keep both versions.

这会导致我的代码出现问题,其中对该包中的类的引用被视为不明确,并导致构建错误.

This is causing issues in my code where references to classes in that package are being treated as ambiguous, and cause build errors.

推荐答案

Uninstall-Package Microsoft.Azure.ServiceBus -version 3.0.1.16 -force

Uninstall-Package Microsoft.Azure.ServiceBus -version 3.0.1.16 -force

这篇关于如何卸载特定版本的 NuGet 包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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