Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ericeil opened this issue Jun 10, 2016 · 11 comments
Closed

Comments

@ericeil
Copy link

ericeil commented Jun 10, 2016

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
@ericeil
Copy link
Author

ericeil commented Jun 10, 2016

Also, got my NuGet.config from here: https://gist.github.com/mellinoe/7580563f9850466ac44352d2b1972c7c

@TheRealPiotrP
Copy link
Contributor

@ericstj @rrelyea any ideas?

@ericstj
Copy link
Member

ericstj commented Jun 14, 2016

Did you have another folder in some directory named 'xunit'?

@ericeil
Copy link
Author

ericeil commented Jun 14, 2016

Did you have another folder in some directory named 'xunit'?

It's possible that there was an "xunit" directory off of the root. So:

c:\x2 <-- where the project was
c:\xunit <-- where I'd started a different project (IIRC)

Why would that make a difference?

@ericstj
Copy link
Member

ericstj commented Jun 14, 2016

Because Nuget tries to find local projects that might replace package references.

See NuGet/Home#1428

@ericeil
Copy link
Author

ericeil commented Jun 14, 2016

Ok, that does seem to explain it. Closing this issue.

@ericeil ericeil closed this as completed Jun 14, 2016
@shanselman
Copy link
Contributor

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

@blackdwarf
Copy link

@shanselman this is something that we should file on NuGet/Home, since dotnet restore pass through to NuGet. The error messages comes from there as well, AFAIK.

@jlberrocal
Copy link

obviously is too late but maybe this will help someone, i was getting this error and was caused because Rider created a reference into the csproj file to itself, i expend some hours before realize this was the issue, of course it was a terrible face palm

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the 1.0.0-preview3 milestone Jan 31, 2020
@ar0311
Copy link

ar0311 commented Apr 6, 2021

Any progress on this?

@yoni333
Copy link

yoni333 commented Sep 20, 2023

Did you have another folder in some directory named 'xunit'?

you save me a lot of time. i try to install xunit to folder name c:\learn\xunit .... after rename the folder name the problem solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants