1

I'm getting a 'Circular dependency detected' error when I'm trying to install Akavache 6.0.0-alpha0038 into my Xamarin.IOs project in Visual Studio 2017.

This is the error in detail,

Error       Circular dependency detected 'akavache 6.0.0-alpha0038 => akavache.core 6.0.0-alpha0038 => System.Reactive 3.1.1 => System.Reactive.PlatformServices 4.0.0-preview00001 => System.Reactive 3.1.1'

How can I resolve this issue?

Rizan Zaky
  • 4,230
  • 3
  • 25
  • 39

2 Answers2

2

In your visual studio, open Options Menu (Tools > Options),

Then, Under, NuGet Package Manager > General, choose PackageReference as the Default package management format for Package Management (refer image)

enter image description here

Now try installing the nuget package, in this case Akavache 6.0.0-alpha0038.

Worked for me

Note: You have to remove packages.config file if it exists. You can remove the file, then install the package, then re-add the file.

Rizan Zaky
  • 4,230
  • 3
  • 25
  • 39
  • 4
    Just a bit more info about why this works. The resolver for packages.config and PackageReference restore styles work differently. Packages.config does the resolution only at install time and tries to resolve all dependencies! It obeys the "nearest first" rule to a tee, and if it happens that leads to a circular dependency, so be it. PackageReference is smarter in that it will try to resolve some of these conflicts and bump-up or bump down some versions. – imps Feb 20 '18 at 08:43
0

Open nuget manager
select package
open options and select dropdown from 'install and update optoins' -'Ignore Dependency'
Same way for uninstall

enter image description here

Suchith
  • 1,276
  • 17
  • 39