Alwyn
Alwyn

Reputation: 8337

How to ignore newer dependency of Nuget package

Nuget package will not install because it's dependent on some older version of a package that's already installed.

This package is NServiceBus Unity, but I am already using a later version of Unity in my projects.

I don't want to uninstall Unity before installing NSB and then reinstalling again since the no of projects would make that a sorry PITA. Is there a way to tell Nuget to ignore the dependency when I already have a newer version and just install the rest? I'm on .NET 4.5.1 and can redirect to newer assembly with ease.

This is the error I am seeing:

Update-Package : Updating 'Unity 2.1.505.2' to 'Unity 3.0.1304.1' failed. Unable to find a version of 'NServiceBus.Unity' that is compatible with 'Unity 3.0.1304.1'. At line:1 char:1

Upvotes: 0

Views: 2485

Answers (1)

Dan Liu
Dan Liu

Reputation: 827

There is a switch called -IgnoreDependencies that can be used with Update-Package. Please give that a try.

Upvotes: 1

Related Questions