24

I am trying to add the Unity package to my solution, but I keep receiving the listed message:

Attempting to resolve dependency 'Unity (≥ 3.5.1404.0)'.

'Unity' already has a dependency defined for 'CommonServiceLocator'.

Any Idea how to fix this?

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Jaster
  • 8,255
  • 3
  • 34
  • 60

2 Answers2

31

This problem arises with older version of nuget. Update nuget PM, 2.8.50313.46 is current version, Look for the latest for VS 2012

Rao Ehsan
  • 778
  • 8
  • 15
  • 3
    I've the latest Nuget "NuGet Package Manager 2.8.60318.667" but I get Install-Package : 'System.Collections' already has a dependency defined for 'Microsoft.NETCore.Platforms'. when trying to install Install-Package Microsoft.AspNet.WebHooks.Custom.AzureStorage -Pre – Gopi Aug 01 '16 at 05:35
  • After updating NuGet, I uninstalled and re-installed the offending package and then it worked for me – Peter Kerr Aug 30 '16 at 13:52
0

You are using Higher version .Net framework. And you are adding Lower version of Unity in to it.

your Application Framework will be above 4.0 or 4.0 and you are adding Unity frame work which is of .net frame 3.5.

Saineshwar Bageri - MVP
  • 3,851
  • 7
  • 41
  • 47