How to uninstall specific version of a NuGet packa

2019-06-21 18:32发布

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?

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.

2条回答
趁早两清
2楼-- · 2019-06-21 19:07

You need to specify the version as well like

Uninstall-Package package_name -version specific_version
查看更多
姐就是有狂的资本
3楼-- · 2019-06-21 19:14

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

查看更多
登录 后发表回答