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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With