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

与世无争的帅哥 提交于 2019-12-12 19:19:42

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/58351619/install-package-dependency-loop-detected-for-package-microsoft-data-sqlite

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!