Question

I've come upon this situation a few times before. I wish to reference a type in my XML comments, but the type is contained in an assembly not referenced by my project.

In A.Dll (references B.DLL):

using B;
///<summary>Hai I'm SomeClass and I use <seealso cref="B.LoserClass"/> to do my work</summary>
public class SomeClass {/*...*/}

In B.DLL (does NOT reference A.DLL):

///<summary> I can't <seealso cref="A.SomeClass"/> in this summary </summary>
public class LoserClass {/*...*/}

In the comments for LoserClass I need to reference SomeClass but I can't due to the fact that B.DLL doesn't reference A.DLL (circular reference).

Is there some way to include the assembly information in the cref within LoserClass' code documentation, so that A.SomeClass can be resolved by the XML documentation generator?

(btw, you can't always resolve this by moving classes as it can cause circular dependencies in other places)

Was it helpful?

Solution

I don't know a way to do this and I'm convinced it doesn't exist. The question is, for what reason do you want you refer in the comments from component B to A? B doesn't know anything of A, right? A uses B, so it makes sense to me, that the comments reflect this dependency too. But the other way around makes no sense to me.

That's just my humble opinion,

Prensen

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top