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)
dotnet restore
works.
dotnet restore
reports "cycle detected" error for xunit.
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
Also, got my NuGet.config from here: https://gist.github.com/mellinoe/7580563f9850466ac44352d2b1972c7c
@ericstj @rrelyea any ideas?
Did you have another folder in some directory named 'xunit'?
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?
Because Nuget tries to find local projects that might replace package references.
Ok, that does seem to explain it. Closing this issue.
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
@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.
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
Most helpful comment
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