question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install-Package AngleSharp results in Depency Loop Detected error

See original GitHub issue

Bug Report

Thanks for doing so much work on this package, probably something with my environment so detail on that is included below.

Description

Installing on Windows 10 as Administrator, with both PowerShell 7.2 Preview (1 & 2) and Windows PowerShell 5.1 results in an error showing Depency Loop after long delay:

Install-Package: Dependency loop detected for package ‘AngleSharp’.

Steps to Reproduce

> Install-Package AngleSharp -Version 0.14.0
Install-Package: Dependency loop detected for package 'AngleSharp'.

# Also tried other combinations, e.g., ...
Install-Package AngleSharp -RequiredVersion 0.14.0 -scope AllUsers -force -Source Nuget.org

Expected behavior: [What you expected to happen] Successful install of the package.

Actual behavior: [What actually happened]

Environment details: PSVersion 7.2.0-preview.2 PSVersion 5.1.21277.1000

[OS, .NET Runtime, ...]
.NET SDK (reflecting any global.json):
 Version:   5.0.200-preview.20601.7
 Commit:    b3b934bbf2

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.21277
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\5.0.200-preview.20601.7\

Host (useful for support):
  Version: 5.0.0
  Commit:  cf258a14b7

.NET SDKs installed:
  2.1.600-preview-009426 [C:\Program Files\dotnet\sdk]
  2.1.700 [C:\Program Files\dotnet\sdk]
  2.1.801 [C:\Program Files\dotnet\sdk]
  3.1.301 [C:\Program Files\dotnet\sdk]
  3.1.401 [C:\Program Files\dotnet\sdk]
  5.0.200-preview.20601.7 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

Possible Solution

None discovered yet: Searching issues for [ is:issue dependency loop ] gave no matches. FAQ has no mention of “Dependency Loop” and references to “install” did not discuss issue. Change log here stops with version 12.0: https://anglesharp.github.io/log.html

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
patwarecommented, Sep 30, 2021

Found a “workaround” ?

Installed AngleSharp from nuget.exe, then install-package but specifying -SkipDependencies

`

nuget install AngleSharp Install-Package ‘AngleSharp’ -Scope ‘CurrentUser’ -Source ‘Nuget.org’ -SkipDependencies `

PSVersion 7.1.4 PSEdition Core

If this helps others.

1reaction
FlorianRapplcommented, Jan 8, 2021

As written @HerbM it will fail on all machines. System.Text.Encoding.CodePages is one of the dependencies of AngleSharp, and this one has a problem.

So as long as this is not fixed in System.Text.Encoding.CodePages all dependent packages such as AngleSharp will keep failing, too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

install-package Visual Studio "Dependecy Loop Detected"
Seems I am using v2 so I updated it now. I just renewed the solution to cleanup any left over dependencies and that...
Read more >
Install-Package : Dependency loop detected for ...
I'm receiving the following error: PowerShell. Copy. Install-Package : Dependency loop detected for package 'Microsoft.SqlServer.
Read more >
AngleSharp 1.0.4
AngleSharp is the ultimate angle brackets parser library. It parses HTML5, CSS3, and XML to construct a DOM based on the official W3C...
Read more >
Dependency loop detected
Error: Dependency loop detected: These packages depend on each other: ... So I'd start with this command, check the actual dependencies.
Read more >
Untitled
Powershell install-package dependency loop WebI would opt for the following script: vim install #!/bin/bash apt-get update # To get the latest package lists ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found