Can´t install the Unity Package from the Package Manager Console

Oct 9, 2014 at 1:01 AM
I'm trying to install the Unity Package from the Package Manager Console and I get an error.

The Coomand I execute is

PM> Install-Package Unity -Version 3.5.1404

And the error:

Install-Package : 'Unity' already has a dependency defined for 'CommonServiceLocator'.
At line:1 char:16
  • Install-Package <<<< Unity -Version 3.5.1404
    • CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
    • FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand.
Does it mean that I already installed it in the past or what?
Oct 9, 2014 at 3:04 AM
That's very strange. With NuGet 2.8.50313.46 and Visual Studio 2013 I don't have any issues. What version of NuGet are you using? If not the latest, I would upgrade.

Randy Levy
Enterprise Library support engineer
Support How-to
Marked as answer by rafaelsoteldo on 10/9/2014 at 6:05 AM
Oct 9, 2014 at 1:47 PM
I have VS 2010 Ultimate, I'll update NuGet...
Oct 9, 2014 at 2:05 PM
The new version is more specific when displaying error details.

The problem was that trhe version of Unity didn´t target my version of Net Framework. I have to install a previous version. Not 3.5.1404