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

[Q] Are transient dependencies supported? #46

Closed
o7g8 opened this issue Feb 13, 2019 · 1 comment
Closed

[Q] Are transient dependencies supported? #46

o7g8 opened this issue Feb 13, 2019 · 1 comment

Comments

@o7g8
Copy link

o7g8 commented Feb 13, 2019

Hello,

Is it possible to capture transient dependencies on type level?
Let's say we have a dependency chain A->B->C:

namespace A {
 class ClassA {
    public B.ClassB B = new B.ClassB();
 }
}

namespace B {
 class ClassB {
    public C.ClassC C = new C.ClassC();
 }
}

namespace C {
 class ClassC {
    public int i = 0;
 }
}

I would like to implement a rule disallowing A->..->C.
I couldn't make it work with current NsDepCop.
Is it possible?

I need to convert big code base to .NET Standard and some of lower layers of the code-base have .NET Standard-incompatible references: to System.Forms, etc. I need to know which upper level code transitively depends on the incompatible stuff (and which doesn't). Is it possible to find out with the help of NsDepCop?

I see my question is related to #35

@realvizu
Copy link
Owner

realvizu commented Feb 17, 2019

Sorry, but transitive dependency checking is not supported.
It's possible that it will be added later, but not in the short term.

You should check out other tools, eg. NDepend supports transitive type dependency quieries AFAIK.

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

No branches or pull requests

2 participants