Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install-package : Dependency loop detected for package 'Microsoft.Data.Sqlite'

I am trying to install Microsoft.Data.Sqlite with PowerShell's cmdLet install-package:

$pkg = find-package -name Microsoft.Data.Sqlite
install-package -force -scope currentUser -verbose $pkg

The second command takes a long time and then responds with

install-package : Dependency loop detected for package 'Microsoft.Data.Sqlite'.
At line:1 char:1
+ install-package -force -scope currentUser -verbose $pkg
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : Deadlock detected: (Microsoft.Data.Sqlite:String) [Install-Package], Exception
+ FullyQualifiedErrorId : DependencyLoopDetected,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Why is that and what do I have to do in order to install this package?

like image 400
René Nyffenegger Avatar asked Oct 12 '19 06:10

René Nyffenegger


1 Answers

First I Install the latest Nuget provider running following command in an elevated PowerShell prompt:

Install-PackageProvider Nuget –force –verbose

I resolved the trouble with another package where I met the same trouble using -SkipDependencies additional parameter :

Install-Package libphonenumber-csharp -Destination ".\NugetPackages" -Force -Source 'https://www.nuget.org/api/v2' -ProviderName NuGet -RequiredVersion '8.10.23' -SkipDependencies -ErrorAction SilentlyContinue

Then install-package works again for this package, I clearly don't understand why it suddendly stop working, but -SkipDependencies is for me the answer to dependency loop.

like image 123
JPBlanc Avatar answered Nov 07 '22 19:11

JPBlanc