Cycle detected for a common library

Kasrak 21 Reputation points
2020-08-12T19:47:54.637+00:00

Here I get Cycle detected error,

There is one really irritating error that I also encountered earlier, which may seems famous for some.

I get this error:

Install-package : NU1108: Cycle detected. 
  Company.NugLib-> Company.NugLib(>= 0.9.108).

Most of the times it installs successfully, but in the build time gives the same error.

Imagine, we have a main library that all our libraries and apps want to use it, we have tens of libraries, here as an example:

Main uses Lib1 and Lib2
Lib2 uses Lib1
All will use our **NugLib**

I need NugLib only privately for each project, they will use it for their own, for example Lib2 doesn't need NugLib as a Lib1's dependency.

Earlier saw some solutions and discussions, which seems they shouldn't apply in my case.
Just I guess cause all the libs have that dependency it may caused this. (not sure)
Tried to test also with PrivateAssets = all , which I never used earlier, and don't know why it seems not working, cause most of the time I see the small yellow triangle badge on my packages.

This error is too irritating for me curently, I am trying to build a reusable platform which using MSBuild.
I can provide a Live Share in Visual Studio if needed to resolve it.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,855 questions
{count} votes