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.

"Cycle detected" error restoring xunittest project on Windows 2016 Nano

See original GitHub issue

Steps to reproduce

Create a new xunittest project on Windows 2016 Nano, and restore it:

[40.78.96.241]: PS C:\x2> C:\dotnet\dotnetnano\dotnet new -t xunittest
Created new C# project in C:\x2.
[40.78.96.241]: PS C:\x2> C:\dotnet\dotnetnano\dotnet restore
log  : Restoring packages for C:\x2\project.json...
error: Cycle detected:
error:   x2 (>= 1.0.0) -> xunit (>= 2.1.0) -> xunit (>= 2.1.0) -> xunit (>= 2.1.0).
log  : Writing lock file to disk. Path: C:\x2\project.lock.json
log  : C:\x2\project.json
log  : Restore failed in 2781ms.
C:\dotnet\dotnetnano\dotnet :
    + CategoryInfo          : NotSpecified: (:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Errors in C:\x2\project.json
    Cycle detected:
      x2 (>= 1.0.0) -> xunit (>= 2.1.0) -> xunit (>= 2.1.0) -> xunit (>= 2.1.0)

Expected behavior

dotnet restore works.

Actual behavior

dotnet restore reports “cycle detected” error for xunit.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-003024)

Product Information:
 Version:            1.0.0-preview2-003024
 Commit SHA-1 hash:  ef4a8e85ef

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14300
 OS Platform: Windows
 RID:         win10-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
shanselmancommented, Jul 18, 2016

I just hit this, just now. We need a better error message. There’s literally no way for someone to figure this out except for Google. Is that OK? /cc @blackdwarf @davidfowl

5reactions
ericstjcommented, Jun 14, 2016

Did you have another folder in some directory named ‘xunit’?

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Cycles detected
I could solve it by right-clicking on the Dependencies, click on 'Add Project Reference' and then unselect all projects related to it/showing ...
Read more >
Cycle detected for a common library - Microsoft Q&A
The error seems to mean that the name of your project is same as the nuget package. Maybe you could rename your project,...
Read more >
xUnit test template fails while restoring on .NET Core 2.0
Your open channel to Microsoft engineering teams ... /Users/smitpatel/Projects/xUnit/xUnit/xUnit.csproj : error NU1108: Cycle detected.
Read more >
NuGet - error NU1108: cycle detected
After that, I noticed that the problem is with the project name. Its name was the same as the referenced NuGet package.
Read more >
How To Resolve Issue Of Test Project Not Running The ...
Once, the upgrade is completed I was testing the solution where I got an error: “unexpected error detected. Check the Tests output Pane...
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